@tetacom/ng-components 1.0.22 → 1.0.23

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.
@@ -6040,10 +6040,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
6040
6040
  args: ['click']
6041
6041
  }] } });
6042
6042
 
6043
+ class DynamicContentBaseDirective {
6044
+ constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
6045
+ this._document = _document;
6046
+ this._elementRef = _elementRef;
6047
+ this._service = _service;
6048
+ this._injector = _injector;
6049
+ this._zone = _zone;
6050
+ this._cdr = _cdr;
6051
+ this.align = Align.left;
6052
+ this.verticalAlign = VerticalAlign.bottom;
6053
+ this.openChange = new EventEmitter();
6054
+ this._alive = true;
6055
+ this._open = false;
6056
+ this._zone.onStable
6057
+ .pipe(takeWhile((_) => this._alive), filter((_) => this._open))
6058
+ .subscribe((_) => {
6059
+ this.setPosition();
6060
+ });
6061
+ }
6062
+ set open(open) {
6063
+ this._open = open;
6064
+ if (this._open) {
6065
+ this.createContentRef();
6066
+ }
6067
+ else {
6068
+ this.destroyContentRef();
6069
+ }
6070
+ }
6071
+ ngOnDestroy() {
6072
+ this._alive = false;
6073
+ this.destroyContentRef();
6074
+ }
6075
+ ngOnInit() { }
6076
+ createContentRef(className) {
6077
+ if (!this._componentRef) {
6078
+ this._open = true;
6079
+ const injector = this._service.getInjector(this.data, this._injector);
6080
+ const context = this._service.getContext(this._dynamicContent, this.data);
6081
+ this._content = this._service.createContent(this._dynamicContent, this._injector, context);
6082
+ this._componentRef = this._service.createComponent(PopupContentComponent, this._content, injector, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
6083
+ if (className) {
6084
+ this._componentRef.instance.addClass(className);
6085
+ }
6086
+ }
6087
+ return this._componentRef;
6088
+ }
6089
+ destroyContentRef() {
6090
+ if (this._open) {
6091
+ this._open = false;
6092
+ this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
6093
+ this._componentRef = null;
6094
+ }
6095
+ }
6096
+ }
6097
+ DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
6098
+ DynamicContentBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DynamicContentBaseDirective, inputs: { data: "data", className: "className", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", open: "open" }, outputs: { openChange: "openChange" }, ngImport: i0 });
6099
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, decorators: [{
6100
+ type: Directive
6101
+ }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
6102
+ type: Input
6103
+ }], className: [{
6104
+ type: Input
6105
+ }], align: [{
6106
+ type: Input
6107
+ }], verticalAlign: [{
6108
+ type: Input
6109
+ }], appendToBody: [{
6110
+ type: Input
6111
+ }], open: [{
6112
+ type: Input
6113
+ }], openChange: [{
6114
+ type: Output
6115
+ }] } });
6116
+
6117
+ class HintDirective extends DynamicContentBaseDirective {
6118
+ constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
6119
+ super(_document, _elementRef, _service, _injector, _zone, _cdr);
6120
+ this._document = _document;
6121
+ this._elementRef = _elementRef;
6122
+ this._service = _service;
6123
+ this._injector = _injector;
6124
+ this._zone = _zone;
6125
+ this._cdr = _cdr;
6126
+ this.align = Align.center;
6127
+ this.verticalAlign = VerticalAlign.top;
6128
+ this.delay = 300;
6129
+ }
6130
+ get _dynamicContent() {
6131
+ return this.tetaHint;
6132
+ }
6133
+ mouseenter() {
6134
+ clearTimeout(this._timeout);
6135
+ this._timeout = setTimeout(() => {
6136
+ this.createHint();
6137
+ }, this.delay);
6138
+ }
6139
+ mouseleave() {
6140
+ clearTimeout(this._timeout);
6141
+ if (this._open && this._componentRef) {
6142
+ this._timeout = setTimeout(() => {
6143
+ this.destroyContentRef();
6144
+ }, this.delay);
6145
+ }
6146
+ }
6147
+ click(event) {
6148
+ if (this._open &&
6149
+ this._componentRef &&
6150
+ DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
6151
+ event.stopPropagation();
6152
+ }
6153
+ }
6154
+ setPosition() {
6155
+ if (this._componentRef && this._open) {
6156
+ if (!this._componentRect) {
6157
+ this._componentRect =
6158
+ this._componentRef.location.nativeElement.getBoundingClientRect();
6159
+ }
6160
+ const position = PositionUtil.getPosition(this._elementRef.nativeElement.getBoundingClientRect(), this._componentRect, this.align, this.verticalAlign, 0, 4);
6161
+ PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
6162
+ }
6163
+ }
6164
+ createHint() {
6165
+ if (!this._dynamicContent) {
6166
+ return;
6167
+ }
6168
+ this._componentRef = this.createContentRef();
6169
+ this._componentRef.instance.className = [
6170
+ ...ArrayUtil.asArray(this.className),
6171
+ 'hint',
6172
+ ];
6173
+ }
6174
+ }
6175
+ HintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: DynamicComponentService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
6176
+ HintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: HintDirective, selector: "[tetaHint]", inputs: { tetaHint: "tetaHint", align: "align", verticalAlign: "verticalAlign", delay: "delay" }, host: { listeners: { "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)", "click": "click($event)" } }, usesInheritance: true, ngImport: i0 });
6177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, decorators: [{
6178
+ type: Directive,
6179
+ args: [{
6180
+ selector: '[tetaHint]',
6181
+ }]
6182
+ }], ctorParameters: function () {
6183
+ return [{ type: undefined, decorators: [{
6184
+ type: Inject,
6185
+ args: [DOCUMENT]
6186
+ }] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }];
6187
+ }, propDecorators: { tetaHint: [{
6188
+ type: Input
6189
+ }], align: [{
6190
+ type: Input
6191
+ }], verticalAlign: [{
6192
+ type: Input
6193
+ }], delay: [{
6194
+ type: Input
6195
+ }], mouseenter: [{
6196
+ type: HostListener,
6197
+ args: ['mouseenter', ['$event']]
6198
+ }], mouseleave: [{
6199
+ type: HostListener,
6200
+ args: ['mouseleave', ['$event']]
6201
+ }], click: [{
6202
+ type: HostListener,
6203
+ args: ['click', ['$event']]
6204
+ }] } });
6205
+
6043
6206
  class PropertyGridItemComponent {
6044
6207
  constructor(_transloco) {
6045
6208
  this._transloco = _transloco;
6046
6209
  this.controlValueChange = new EventEmitter();
6210
+ this.align = Align;
6047
6211
  this.filterTypeEnum = FilterType;
6048
6212
  this._alive = true;
6049
6213
  }
@@ -6112,10 +6276,10 @@ class PropertyGridItemComponent {
6112
6276
  }
6113
6277
  }
6114
6278
  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 });
6115
- 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 [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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
6279
+ 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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
6116
6280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
6117
6281
  type: Component,
6118
- args: [{ selector: 'teta-property-grid-item', template: "<teta-input [label]=\"caption\"\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: [""] }]
6282
+ 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: [""] }]
6119
6283
  }], ctorParameters: function () { return [{ type: i1$1.TranslocoService }]; }, propDecorators: { column: [{
6120
6284
  type: Input
6121
6285
  }], hideNonEditable: [{
@@ -6312,6 +6476,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
6312
6476
  }]
6313
6477
  }] });
6314
6478
 
6479
+ class HintModule {
6480
+ }
6481
+ HintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6482
+ HintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, declarations: [HintDirective], imports: [CommonModule,
6483
+ DynamicComponentModule], exports: [HintDirective] });
6484
+ HintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, imports: [[
6485
+ CommonModule,
6486
+ DynamicComponentModule
6487
+ ]] });
6488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, decorators: [{
6489
+ type: NgModule,
6490
+ args: [{
6491
+ declarations: [HintDirective],
6492
+ exports: [HintDirective],
6493
+ imports: [
6494
+ CommonModule,
6495
+ DynamicComponentModule
6496
+ ]
6497
+ }]
6498
+ }] });
6499
+
6315
6500
  class PropertyGridModule {
6316
6501
  }
6317
6502
  PropertyGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -6330,7 +6515,8 @@ PropertyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
6330
6515
  InputModule,
6331
6516
  ToggleModule,
6332
6517
  ReactiveFormsModule,
6333
- TranslocoModule], exports: [PropertyGridComponent] });
6518
+ TranslocoModule,
6519
+ HintModule], exports: [PropertyGridComponent] });
6334
6520
  PropertyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, providers: [
6335
6521
  {
6336
6522
  provide: TRANSLOCO_SCOPE,
@@ -6348,6 +6534,7 @@ PropertyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
6348
6534
  ToggleModule,
6349
6535
  ReactiveFormsModule,
6350
6536
  TranslocoModule,
6537
+ HintModule,
6351
6538
  ]] });
6352
6539
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, decorators: [{
6353
6540
  type: NgModule,
@@ -6373,6 +6560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
6373
6560
  ToggleModule,
6374
6561
  ReactiveFormsModule,
6375
6562
  TranslocoModule,
6563
+ HintModule,
6376
6564
  ],
6377
6565
  providers: [
6378
6566
  {
@@ -7496,169 +7684,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
7496
7684
  args: ['class.table-head__cell__component']
7497
7685
  }] } });
7498
7686
 
7499
- class DynamicContentBaseDirective {
7500
- constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
7501
- this._document = _document;
7502
- this._elementRef = _elementRef;
7503
- this._service = _service;
7504
- this._injector = _injector;
7505
- this._zone = _zone;
7506
- this._cdr = _cdr;
7507
- this.align = Align.left;
7508
- this.verticalAlign = VerticalAlign.bottom;
7509
- this.openChange = new EventEmitter();
7510
- this._alive = true;
7511
- this._open = false;
7512
- this._zone.onStable
7513
- .pipe(takeWhile((_) => this._alive), filter((_) => this._open))
7514
- .subscribe((_) => {
7515
- this.setPosition();
7516
- });
7517
- }
7518
- set open(open) {
7519
- this._open = open;
7520
- if (this._open) {
7521
- this.createContentRef();
7522
- }
7523
- else {
7524
- this.destroyContentRef();
7525
- }
7526
- }
7527
- ngOnDestroy() {
7528
- this._alive = false;
7529
- this.destroyContentRef();
7530
- }
7531
- ngOnInit() { }
7532
- createContentRef(className) {
7533
- if (!this._componentRef) {
7534
- this._open = true;
7535
- const injector = this._service.getInjector(this.data, this._injector);
7536
- const context = this._service.getContext(this._dynamicContent, this.data);
7537
- this._content = this._service.createContent(this._dynamicContent, this._injector, context);
7538
- this._componentRef = this._service.createComponent(PopupContentComponent, this._content, injector, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
7539
- if (className) {
7540
- this._componentRef.instance.addClass(className);
7541
- }
7542
- }
7543
- return this._componentRef;
7544
- }
7545
- destroyContentRef() {
7546
- if (this._open) {
7547
- this._open = false;
7548
- this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
7549
- this._componentRef = null;
7550
- }
7551
- }
7552
- }
7553
- DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
7554
- DynamicContentBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: DynamicContentBaseDirective, inputs: { data: "data", className: "className", align: "align", verticalAlign: "verticalAlign", appendToBody: "appendToBody", open: "open" }, outputs: { openChange: "openChange" }, ngImport: i0 });
7555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, decorators: [{
7556
- type: Directive
7557
- }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
7558
- type: Input
7559
- }], className: [{
7560
- type: Input
7561
- }], align: [{
7562
- type: Input
7563
- }], verticalAlign: [{
7564
- type: Input
7565
- }], appendToBody: [{
7566
- type: Input
7567
- }], open: [{
7568
- type: Input
7569
- }], openChange: [{
7570
- type: Output
7571
- }] } });
7572
-
7573
- class HintDirective extends DynamicContentBaseDirective {
7574
- constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
7575
- super(_document, _elementRef, _service, _injector, _zone, _cdr);
7576
- this._document = _document;
7577
- this._elementRef = _elementRef;
7578
- this._service = _service;
7579
- this._injector = _injector;
7580
- this._zone = _zone;
7581
- this._cdr = _cdr;
7582
- this.align = Align.center;
7583
- this.verticalAlign = VerticalAlign.top;
7584
- this.delay = 300;
7585
- }
7586
- get _dynamicContent() {
7587
- return this.tetaHint;
7588
- }
7589
- mouseenter() {
7590
- clearTimeout(this._timeout);
7591
- this._timeout = setTimeout(() => {
7592
- this.createHint();
7593
- }, this.delay);
7594
- }
7595
- mouseleave() {
7596
- clearTimeout(this._timeout);
7597
- if (this._open && this._componentRef) {
7598
- this._timeout = setTimeout(() => {
7599
- this.destroyContentRef();
7600
- }, this.delay);
7601
- }
7602
- }
7603
- click(event) {
7604
- if (this._open &&
7605
- this._componentRef &&
7606
- DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
7607
- event.stopPropagation();
7608
- }
7609
- }
7610
- setPosition() {
7611
- if (this._componentRef && this._open) {
7612
- if (!this._componentRect) {
7613
- this._componentRect =
7614
- this._componentRef.location.nativeElement.getBoundingClientRect();
7615
- }
7616
- const position = PositionUtil.getPosition(this._elementRef.nativeElement.getBoundingClientRect(), this._componentRect, this.align, this.verticalAlign, 0, 4);
7617
- PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
7618
- }
7619
- }
7620
- createHint() {
7621
- if (!this._dynamicContent) {
7622
- return;
7623
- }
7624
- this._componentRef = this.createContentRef();
7625
- this._componentRef.instance.className = [
7626
- ...ArrayUtil.asArray(this.className),
7627
- 'hint',
7628
- ];
7629
- }
7630
- }
7631
- HintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: DynamicComponentService }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
7632
- HintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.1", type: HintDirective, selector: "[tetaHint]", inputs: { tetaHint: "tetaHint", align: "align", verticalAlign: "verticalAlign", delay: "delay" }, host: { listeners: { "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)", "click": "click($event)" } }, usesInheritance: true, ngImport: i0 });
7633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, decorators: [{
7634
- type: Directive,
7635
- args: [{
7636
- selector: '[tetaHint]',
7637
- }]
7638
- }], ctorParameters: function () {
7639
- return [{ type: undefined, decorators: [{
7640
- type: Inject,
7641
- args: [DOCUMENT]
7642
- }] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }];
7643
- }, propDecorators: { tetaHint: [{
7644
- type: Input
7645
- }], align: [{
7646
- type: Input
7647
- }], verticalAlign: [{
7648
- type: Input
7649
- }], delay: [{
7650
- type: Input
7651
- }], mouseenter: [{
7652
- type: HostListener,
7653
- args: ['mouseenter', ['$event']]
7654
- }], mouseleave: [{
7655
- type: HostListener,
7656
- args: ['mouseleave', ['$event']]
7657
- }], click: [{
7658
- type: HostListener,
7659
- args: ['click', ['$event']]
7660
- }] } });
7661
-
7662
7687
  class DefaultHeadCellComponent extends HeadCellComponentBase {
7663
7688
  constructor(_cdr) {
7664
7689
  super();
@@ -9685,27 +9710,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
9685
9710
  }]
9686
9711
  }] });
9687
9712
 
9688
- class HintModule {
9689
- }
9690
- HintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9691
- HintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, declarations: [HintDirective], imports: [CommonModule,
9692
- DynamicComponentModule], exports: [HintDirective] });
9693
- HintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, imports: [[
9694
- CommonModule,
9695
- DynamicComponentModule
9696
- ]] });
9697
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, decorators: [{
9698
- type: NgModule,
9699
- args: [{
9700
- declarations: [HintDirective],
9701
- exports: [HintDirective],
9702
- imports: [
9703
- CommonModule,
9704
- DynamicComponentModule
9705
- ]
9706
- }]
9707
- }] });
9708
-
9709
9713
  class TetaTemplateModule {
9710
9714
  }
9711
9715
  TetaTemplateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaTemplateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });