@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.
@@ -5999,10 +5999,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
5999
5999
  args: ['click']
6000
6000
  }] } });
6001
6001
 
6002
+ class DynamicContentBaseDirective {
6003
+ constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
6004
+ this._document = _document;
6005
+ this._elementRef = _elementRef;
6006
+ this._service = _service;
6007
+ this._injector = _injector;
6008
+ this._zone = _zone;
6009
+ this._cdr = _cdr;
6010
+ this.align = Align.left;
6011
+ this.verticalAlign = VerticalAlign.bottom;
6012
+ this.openChange = new EventEmitter();
6013
+ this._alive = true;
6014
+ this._open = false;
6015
+ this._zone.onStable
6016
+ .pipe(takeWhile((_) => this._alive), filter((_) => this._open))
6017
+ .subscribe((_) => {
6018
+ this.setPosition();
6019
+ });
6020
+ }
6021
+ set open(open) {
6022
+ this._open = open;
6023
+ if (this._open) {
6024
+ this.createContentRef();
6025
+ }
6026
+ else {
6027
+ this.destroyContentRef();
6028
+ }
6029
+ }
6030
+ ngOnDestroy() {
6031
+ this._alive = false;
6032
+ this.destroyContentRef();
6033
+ }
6034
+ ngOnInit() { }
6035
+ createContentRef(className) {
6036
+ if (!this._componentRef) {
6037
+ this._open = true;
6038
+ const injector = this._service.getInjector(this.data, this._injector);
6039
+ const context = this._service.getContext(this._dynamicContent, this.data);
6040
+ this._content = this._service.createContent(this._dynamicContent, this._injector, context);
6041
+ this._componentRef = this._service.createComponent(PopupContentComponent, this._content, injector, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
6042
+ if (className) {
6043
+ this._componentRef.instance.addClass(className);
6044
+ }
6045
+ }
6046
+ return this._componentRef;
6047
+ }
6048
+ destroyContentRef() {
6049
+ if (this._open) {
6050
+ this._open = false;
6051
+ this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
6052
+ this._componentRef = null;
6053
+ }
6054
+ }
6055
+ }
6056
+ DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
6057
+ 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 });
6058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, decorators: [{
6059
+ type: Directive
6060
+ }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
6061
+ type: Input
6062
+ }], className: [{
6063
+ type: Input
6064
+ }], align: [{
6065
+ type: Input
6066
+ }], verticalAlign: [{
6067
+ type: Input
6068
+ }], appendToBody: [{
6069
+ type: Input
6070
+ }], open: [{
6071
+ type: Input
6072
+ }], openChange: [{
6073
+ type: Output
6074
+ }] } });
6075
+
6076
+ class HintDirective extends DynamicContentBaseDirective {
6077
+ constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
6078
+ super(_document, _elementRef, _service, _injector, _zone, _cdr);
6079
+ this._document = _document;
6080
+ this._elementRef = _elementRef;
6081
+ this._service = _service;
6082
+ this._injector = _injector;
6083
+ this._zone = _zone;
6084
+ this._cdr = _cdr;
6085
+ this.align = Align.center;
6086
+ this.verticalAlign = VerticalAlign.top;
6087
+ this.delay = 300;
6088
+ }
6089
+ get _dynamicContent() {
6090
+ return this.tetaHint;
6091
+ }
6092
+ mouseenter() {
6093
+ clearTimeout(this._timeout);
6094
+ this._timeout = setTimeout(() => {
6095
+ this.createHint();
6096
+ }, this.delay);
6097
+ }
6098
+ mouseleave() {
6099
+ clearTimeout(this._timeout);
6100
+ if (this._open && this._componentRef) {
6101
+ this._timeout = setTimeout(() => {
6102
+ this.destroyContentRef();
6103
+ }, this.delay);
6104
+ }
6105
+ }
6106
+ click(event) {
6107
+ if (this._open &&
6108
+ this._componentRef &&
6109
+ DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
6110
+ event.stopPropagation();
6111
+ }
6112
+ }
6113
+ setPosition() {
6114
+ if (this._componentRef && this._open) {
6115
+ if (!this._componentRect) {
6116
+ this._componentRect =
6117
+ this._componentRef.location.nativeElement.getBoundingClientRect();
6118
+ }
6119
+ const position = PositionUtil.getPosition(this._elementRef.nativeElement.getBoundingClientRect(), this._componentRect, this.align, this.verticalAlign, 0, 4);
6120
+ PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
6121
+ }
6122
+ }
6123
+ createHint() {
6124
+ if (!this._dynamicContent) {
6125
+ return;
6126
+ }
6127
+ this._componentRef = this.createContentRef();
6128
+ this._componentRef.instance.className = [
6129
+ ...ArrayUtil.asArray(this.className),
6130
+ 'hint',
6131
+ ];
6132
+ }
6133
+ }
6134
+ 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 });
6135
+ 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 });
6136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, decorators: [{
6137
+ type: Directive,
6138
+ args: [{
6139
+ selector: '[tetaHint]',
6140
+ }]
6141
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
6142
+ type: Inject,
6143
+ args: [DOCUMENT]
6144
+ }] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tetaHint: [{
6145
+ type: Input
6146
+ }], align: [{
6147
+ type: Input
6148
+ }], verticalAlign: [{
6149
+ type: Input
6150
+ }], delay: [{
6151
+ type: Input
6152
+ }], mouseenter: [{
6153
+ type: HostListener,
6154
+ args: ['mouseenter', ['$event']]
6155
+ }], mouseleave: [{
6156
+ type: HostListener,
6157
+ args: ['mouseleave', ['$event']]
6158
+ }], click: [{
6159
+ type: HostListener,
6160
+ args: ['click', ['$event']]
6161
+ }] } });
6162
+
6002
6163
  class PropertyGridItemComponent {
6003
6164
  constructor(_transloco) {
6004
6165
  this._transloco = _transloco;
6005
6166
  this.controlValueChange = new EventEmitter();
6167
+ this.align = Align;
6006
6168
  this.filterTypeEnum = FilterType;
6007
6169
  this._alive = true;
6008
6170
  }
@@ -6068,10 +6230,10 @@ class PropertyGridItemComponent {
6068
6230
  }
6069
6231
  }
6070
6232
  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 });
6071
- 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]" }] });
6233
+ 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]" }] });
6072
6234
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
6073
6235
  type: Component,
6074
- 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: [""] }]
6236
+ 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: [""] }]
6075
6237
  }], ctorParameters: function () { return [{ type: i1$1.TranslocoService }]; }, propDecorators: { column: [{
6076
6238
  type: Input
6077
6239
  }], hideNonEditable: [{
@@ -6267,6 +6429,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
6267
6429
  }]
6268
6430
  }] });
6269
6431
 
6432
+ class HintModule {
6433
+ }
6434
+ HintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6435
+ HintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, declarations: [HintDirective], imports: [CommonModule,
6436
+ DynamicComponentModule], exports: [HintDirective] });
6437
+ HintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, imports: [[
6438
+ CommonModule,
6439
+ DynamicComponentModule
6440
+ ]] });
6441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, decorators: [{
6442
+ type: NgModule,
6443
+ args: [{
6444
+ declarations: [HintDirective],
6445
+ exports: [HintDirective],
6446
+ imports: [
6447
+ CommonModule,
6448
+ DynamicComponentModule
6449
+ ]
6450
+ }]
6451
+ }] });
6452
+
6270
6453
  class PropertyGridModule {
6271
6454
  }
6272
6455
  PropertyGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -6285,7 +6468,8 @@ PropertyGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
6285
6468
  InputModule,
6286
6469
  ToggleModule,
6287
6470
  ReactiveFormsModule,
6288
- TranslocoModule], exports: [PropertyGridComponent] });
6471
+ TranslocoModule,
6472
+ HintModule], exports: [PropertyGridComponent] });
6289
6473
  PropertyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, providers: [
6290
6474
  {
6291
6475
  provide: TRANSLOCO_SCOPE,
@@ -6303,6 +6487,7 @@ PropertyGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
6303
6487
  ToggleModule,
6304
6488
  ReactiveFormsModule,
6305
6489
  TranslocoModule,
6490
+ HintModule,
6306
6491
  ]] });
6307
6492
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: PropertyGridModule, decorators: [{
6308
6493
  type: NgModule,
@@ -6328,6 +6513,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
6328
6513
  ToggleModule,
6329
6514
  ReactiveFormsModule,
6330
6515
  TranslocoModule,
6516
+ HintModule,
6331
6517
  ],
6332
6518
  providers: [
6333
6519
  {
@@ -7441,167 +7627,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
7441
7627
  args: ['class.table-head__cell__component']
7442
7628
  }] } });
7443
7629
 
7444
- class DynamicContentBaseDirective {
7445
- constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
7446
- this._document = _document;
7447
- this._elementRef = _elementRef;
7448
- this._service = _service;
7449
- this._injector = _injector;
7450
- this._zone = _zone;
7451
- this._cdr = _cdr;
7452
- this.align = Align.left;
7453
- this.verticalAlign = VerticalAlign.bottom;
7454
- this.openChange = new EventEmitter();
7455
- this._alive = true;
7456
- this._open = false;
7457
- this._zone.onStable
7458
- .pipe(takeWhile((_) => this._alive), filter((_) => this._open))
7459
- .subscribe((_) => {
7460
- this.setPosition();
7461
- });
7462
- }
7463
- set open(open) {
7464
- this._open = open;
7465
- if (this._open) {
7466
- this.createContentRef();
7467
- }
7468
- else {
7469
- this.destroyContentRef();
7470
- }
7471
- }
7472
- ngOnDestroy() {
7473
- this._alive = false;
7474
- this.destroyContentRef();
7475
- }
7476
- ngOnInit() { }
7477
- createContentRef(className) {
7478
- if (!this._componentRef) {
7479
- this._open = true;
7480
- const injector = this._service.getInjector(this.data, this._injector);
7481
- const context = this._service.getContext(this._dynamicContent, this.data);
7482
- this._content = this._service.createContent(this._dynamicContent, this._injector, context);
7483
- this._componentRef = this._service.createComponent(PopupContentComponent, this._content, injector, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
7484
- if (className) {
7485
- this._componentRef.instance.addClass(className);
7486
- }
7487
- }
7488
- return this._componentRef;
7489
- }
7490
- destroyContentRef() {
7491
- if (this._open) {
7492
- this._open = false;
7493
- this._service.destroy(this._componentRef, this._content, this.appendToBody ? this._document.body : this._elementRef.nativeElement);
7494
- this._componentRef = null;
7495
- }
7496
- }
7497
- }
7498
- DynamicContentBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
7499
- 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 });
7500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: DynamicContentBaseDirective, decorators: [{
7501
- type: Directive
7502
- }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
7503
- type: Input
7504
- }], className: [{
7505
- type: Input
7506
- }], align: [{
7507
- type: Input
7508
- }], verticalAlign: [{
7509
- type: Input
7510
- }], appendToBody: [{
7511
- type: Input
7512
- }], open: [{
7513
- type: Input
7514
- }], openChange: [{
7515
- type: Output
7516
- }] } });
7517
-
7518
- class HintDirective extends DynamicContentBaseDirective {
7519
- constructor(_document, _elementRef, _service, _injector, _zone, _cdr) {
7520
- super(_document, _elementRef, _service, _injector, _zone, _cdr);
7521
- this._document = _document;
7522
- this._elementRef = _elementRef;
7523
- this._service = _service;
7524
- this._injector = _injector;
7525
- this._zone = _zone;
7526
- this._cdr = _cdr;
7527
- this.align = Align.center;
7528
- this.verticalAlign = VerticalAlign.top;
7529
- this.delay = 300;
7530
- }
7531
- get _dynamicContent() {
7532
- return this.tetaHint;
7533
- }
7534
- mouseenter() {
7535
- clearTimeout(this._timeout);
7536
- this._timeout = setTimeout(() => {
7537
- this.createHint();
7538
- }, this.delay);
7539
- }
7540
- mouseleave() {
7541
- clearTimeout(this._timeout);
7542
- if (this._open && this._componentRef) {
7543
- this._timeout = setTimeout(() => {
7544
- this.destroyContentRef();
7545
- }, this.delay);
7546
- }
7547
- }
7548
- click(event) {
7549
- if (this._open &&
7550
- this._componentRef &&
7551
- DomUtil.clickedInside(this._componentRef.location.nativeElement, event)) {
7552
- event.stopPropagation();
7553
- }
7554
- }
7555
- setPosition() {
7556
- if (this._componentRef && this._open) {
7557
- if (!this._componentRect) {
7558
- this._componentRect =
7559
- this._componentRef.location.nativeElement.getBoundingClientRect();
7560
- }
7561
- const position = PositionUtil.getPosition(this._elementRef.nativeElement.getBoundingClientRect(), this._componentRect, this.align, this.verticalAlign, 0, 4);
7562
- PositionUtil.setElementPosition(this._componentRef.location.nativeElement, position);
7563
- }
7564
- }
7565
- createHint() {
7566
- if (!this._dynamicContent) {
7567
- return;
7568
- }
7569
- this._componentRef = this.createContentRef();
7570
- this._componentRef.instance.className = [
7571
- ...ArrayUtil.asArray(this.className),
7572
- 'hint',
7573
- ];
7574
- }
7575
- }
7576
- 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 });
7577
- 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 });
7578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintDirective, decorators: [{
7579
- type: Directive,
7580
- args: [{
7581
- selector: '[tetaHint]',
7582
- }]
7583
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7584
- type: Inject,
7585
- args: [DOCUMENT]
7586
- }] }, { type: i0.ElementRef }, { type: DynamicComponentService }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { tetaHint: [{
7587
- type: Input
7588
- }], align: [{
7589
- type: Input
7590
- }], verticalAlign: [{
7591
- type: Input
7592
- }], delay: [{
7593
- type: Input
7594
- }], mouseenter: [{
7595
- type: HostListener,
7596
- args: ['mouseenter', ['$event']]
7597
- }], mouseleave: [{
7598
- type: HostListener,
7599
- args: ['mouseleave', ['$event']]
7600
- }], click: [{
7601
- type: HostListener,
7602
- args: ['click', ['$event']]
7603
- }] } });
7604
-
7605
7630
  class DefaultHeadCellComponent extends HeadCellComponentBase {
7606
7631
  constructor(_cdr) {
7607
7632
  super();
@@ -9603,27 +9628,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
9603
9628
  }]
9604
9629
  }] });
9605
9630
 
9606
- class HintModule {
9607
- }
9608
- HintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9609
- HintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, declarations: [HintDirective], imports: [CommonModule,
9610
- DynamicComponentModule], exports: [HintDirective] });
9611
- HintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, imports: [[
9612
- CommonModule,
9613
- DynamicComponentModule
9614
- ]] });
9615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: HintModule, decorators: [{
9616
- type: NgModule,
9617
- args: [{
9618
- declarations: [HintDirective],
9619
- exports: [HintDirective],
9620
- imports: [
9621
- CommonModule,
9622
- DynamicComponentModule
9623
- ]
9624
- }]
9625
- }] });
9626
-
9627
9631
  class TetaTemplateModule {
9628
9632
  }
9629
9633
  TetaTemplateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: TetaTemplateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });