@tetacom/ng-components 1.6.6 → 1.6.8

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.
@@ -4608,7 +4608,8 @@ var FilterType;
4608
4608
  FilterType[FilterType["date"] = 2] = "date";
4609
4609
  FilterType[FilterType["list"] = 3] = "list";
4610
4610
  FilterType[FilterType["boolean"] = 4] = "boolean";
4611
- FilterType[FilterType["custom"] = 5] = "custom";
4611
+ FilterType[FilterType["color"] = 5] = "color";
4612
+ FilterType[FilterType["custom"] = 6] = "custom";
4612
4613
  })(FilterType || (FilterType = {}));
4613
4614
 
4614
4615
  const filterComponentsMap = new Map()
@@ -4617,6 +4618,7 @@ const filterComponentsMap = new Map()
4617
4618
  .set(FilterType.list, ListFilterComponent)
4618
4619
  .set(FilterType.string, StringFilterComponent)
4619
4620
  .set(FilterType.boolean, BooleanFilterComponent)
4621
+ .set(FilterType.color, StringFilterComponent)
4620
4622
  .set(FilterType.custom, StringFilterComponent);
4621
4623
  const getFilterComponent = (item) => filterComponentsMap.has(item.filterType) ? filterComponentsMap.get(item.filterType) : StringFilterComponent;
4622
4624
 
@@ -4655,7 +4657,7 @@ class FilterHostComponent {
4655
4657
  this._alive = true;
4656
4658
  }
4657
4659
  ngOnInit() {
4658
- if (!FilterComponentBase.isPrototypeOf(this._column.filterComponent)) {
4660
+ if (!Object.prototype.isPrototypeOf.call(FilterComponentBase, this._column.filterComponent)) {
4659
4661
  this._column.filterComponent = getFilterComponent(this._column);
4660
4662
  }
4661
4663
  this._componentRef = this.viewContainerRef.createComponent(this._column.filterComponent);
@@ -4771,7 +4773,7 @@ class ColorInputComponent {
4771
4773
  useExisting: forwardRef(() => ColorInputComponent),
4772
4774
  multi: true,
4773
4775
  },
4774
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n type=\"color\"\n #input\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n [ngModel]=\"getHexColor(value)\"\n (ngModelChange)=\"value = $event; onChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\"\n/>\n", styles: [":host{display:inline-flex;align-items:center}input[type=color]{height:12px;width:12px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4776
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input\n type=\"color\"\n #input\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n [ngModel]=\"getHexColor(value)\"\n (ngModelChange)=\"value = $event; onChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\"\n/>\n", styles: [":host{display:inline-flex;align-items:center}input[type=color]{height:16px;width:16px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4775
4777
  }
4776
4778
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ColorInputComponent, decorators: [{
4777
4779
  type: Component,
@@ -4781,7 +4783,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
4781
4783
  useExisting: forwardRef(() => ColorInputComponent),
4782
4784
  multi: true,
4783
4785
  },
4784
- ], changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule], template: "<input\n type=\"color\"\n #input\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n [ngModel]=\"getHexColor(value)\"\n (ngModelChange)=\"value = $event; onChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\"\n/>\n", styles: [":host{display:inline-flex;align-items:center}input[type=color]{height:12px;width:12px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"] }]
4786
+ ], changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule], template: "<input\n type=\"color\"\n #input\n [disabled]=\"disabled\"\n (blur)=\"emitBlur()\"\n [ngModel]=\"getHexColor(value)\"\n (ngModelChange)=\"value = $event; onChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\"\n/>\n", styles: [":host{display:inline-flex;align-items:center}input[type=color]{height:16px;width:16px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"] }]
4785
4787
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
4786
4788
  type: Input
4787
4789
  }], input: [{
@@ -5925,6 +5927,9 @@ class SelectComponent {
5925
5927
  this._cdr.detectChanges();
5926
5928
  }
5927
5929
  clickOption(option, event) {
5930
+ if (option.disabled === true) {
5931
+ return;
5932
+ }
5928
5933
  if (this.multiple === true) {
5929
5934
  if (!this.value?.length) {
5930
5935
  this.value = [];
@@ -6034,7 +6039,7 @@ class SelectComponent {
6034
6039
  useExisting: forwardRef(() => SelectComponent),
6035
6040
  multi: true,
6036
6041
  },
6037
- ], queries: [{ propertyName: "optionDirective", first: true, predicate: SelectOptionDirective, descendants: true, static: true }, { propertyName: "valueDirective", first: true, predicate: SelectValueDirective, descendants: true, static: true }], ngImport: i0, template: "@if (locale | async; as loc) {\n <teta-dropdown\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n [viewType]=\"viewType\"\n class=\"row row_auto\"\n >\n <div tetaDropdownHead [class]=\"'row row_auto select-head select_' + viewType\" [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n @if (icon) {\n <teta-icon [name]=\"icon\" [palette]=\"'text'\" class=\"margin-right-1\"></teta-icon>\n }\n @if ((value === null || value === undefined || value?.length === 0) && !multiple) {\n <span class=\"placeholder\">\n {{ placeholder || loc.notSelected }}\n </span>\n }\n <ng-container\n *ngTemplateOutlet=\"\n valueDirective ? valueDirective.template : valueDefault;\n context: { $implicit: value, value: value }\n \"\n ></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\" [palette]=\"'text'\"></teta-icon>\n </div>\n @if (options?.length) {\n <div tetaDropdownContent class=\"select-body row_auto\" (click)=\"$event.preventDefault()\">\n @if (searchRef) {\n <div class=\"select-search padding-h-2 padding-top-2\">\n <teta-text-field\n [ngModel]=\"searchText\"\n [class]=\"'select_' + viewType\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"loc.search\"\n [leftIconName]=\"'search'\"\n ></teta-text-field>\n </div>\n }\n @if (visibleOptions?.length) {\n @if (!multiple && allowNull) {\n <div [class]=\"'margin-h-2 list-item list-item_interactive select_' + viewType\" (click)=\"clear()\">\n {{ loc.notSelected }}\n </div>\n <div class=\"list-divider margin-bottom-0\"></div>\n }\n @if (virtual) {\n <div class=\"column column_auto padding-v-2\" style=\"height: 10000px;\">\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <cdk-virtual-scroll-viewport\n tetaScrollable\n [itemSize]=\"28\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\"\n style=\"flex-grow: 1;\">\n <div [class]=\"'margin-h-2 list-item list-item_interactive justify-content-between select_' + viewType\"\n style=\"display: flex;\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0\"\n [class.list-item_active]=\"itemSelected(option)\"\n [tetaHighlight]=\"searchText\"\n (click)=\"clickOption(option, $event)\">\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault;context: { $implicit: option, option: option }\"\n >\n </ng-container>\n </div>\n @if (itemSelected(option)) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\" class=\"margin-left-2\"></teta-icon>\n }\n </div>\n </cdk-virtual-scroll-viewport>\n </teta-scrollable>\n </div>\n } @else {\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <div class=\"list\">\n @for (option of visibleOptions; track option) {\n <div\n [class]=\"'list-item list-item_interactive justify-content-between select_' + viewType\"\n [class.list-item_active]=\"itemSelected(option)\"\n (click)=\"clickOption(option, $event)\"\n >\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </span>\n @if (itemSelected(option) && multiple) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\"></teta-icon>\n }\n </div>\n }\n </div>\n </teta-scrollable>\n }\n } @else {\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n }\n @if (multiple && value?.length) {\n <div class=\"row row_auto select-chip-field flex-wrap\">\n @for (item of value; track item) {\n <div class=\"tag\">\n <p>{{ getText(item) }}</p>\n <teta-icon\n class=\"cursor-pointer\"\n [palette]=\"'text'\"\n [name]=\"'closeCircle'\"\n (click)=\"removeItemClick(item, $event)\"\n ></teta-icon>\n </div>\n }\n </div>\n }\n </div>\n }\n </teta-dropdown>\n <ng-template #notFound>\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n </ng-template>\n <ng-template #optionDefault let-option>\n {{ getText(option) }}\n </ng-template>\n <ng-template #valueDefault let-value>\n @if (multiple) {\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\">\n {{ loc.selected + ' ' + value?.length }}\n </div>\n }\n @if (!multiple) {\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{ getText(value) }}</span>\n }\n </ng-template>\n}\n", styles: [""], dependencies: [{ kind: "component", type: DropdownComponent, selector: "teta-dropdown", exportAs: ["dropdown"] }, { kind: "directive", type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ScrollableComponent, selector: "teta-scrollable", inputs: ["direction", "showScrollbars", "contentClass"], outputs: ["scroll"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: ScrollableDirective, selector: "[tetaScrollable]" }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "directive", type: HighlightDirective, selector: "[tetaHighlight]", inputs: ["tetaHighlight"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6042
+ ], queries: [{ propertyName: "optionDirective", first: true, predicate: SelectOptionDirective, descendants: true, static: true }, { propertyName: "valueDirective", first: true, predicate: SelectValueDirective, descendants: true, static: true }], ngImport: i0, template: "@if (locale | async; as loc) {\n <teta-dropdown\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n [viewType]=\"viewType\"\n class=\"row row_auto\"\n >\n <div tetaDropdownHead [class]=\"'row row_auto select-head select_' + viewType\" [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n @if (icon) {\n <teta-icon [name]=\"icon\" [palette]=\"'text'\" class=\"margin-right-1\"></teta-icon>\n }\n @if ((value === null || value === undefined || value?.length === 0) && !multiple) {\n <span class=\"placeholder\">\n {{ placeholder || loc.notSelected }}\n </span>\n }\n <ng-container\n *ngTemplateOutlet=\"\n valueDirective ? valueDirective.template : valueDefault;\n context: { $implicit: value, value: value }\n \"\n ></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\" [palette]=\"'text'\"></teta-icon>\n </div>\n @if (options?.length) {\n <div tetaDropdownContent class=\"select-body row_auto\" (click)=\"$event.preventDefault()\">\n @if (searchRef) {\n <div class=\"select-search padding-h-2 padding-top-2\">\n <teta-text-field\n [ngModel]=\"searchText\"\n [class]=\"'select_' + viewType\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"loc.search\"\n [leftIconName]=\"'search'\"\n ></teta-text-field>\n </div>\n }\n @if (visibleOptions?.length) {\n @if (!multiple && allowNull) {\n <div [class]=\"'margin-h-2 list-item list-item_interactive select_' + viewType\" (click)=\"clear()\">\n {{ loc.notSelected }}\n </div>\n <div class=\"list-divider margin-bottom-0\"></div>\n }\n @if (virtual) {\n <div class=\"column column_auto padding-v-2\" style=\"height: 50vh\">\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <cdk-virtual-scroll-viewport\n tetaScrollable\n [itemSize]=\"28\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\"\n style=\"flex-grow: 1\"\n >\n <div\n [class]=\"'margin-h-2 list-item list-item_interactive justify-content-between select_' + viewType\"\n style=\"display: flex\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.list-item_disabled]=\"option.disabled === true\"\n [tetaHighlight]=\"searchText\"\n [style.height.px]=\"28\"\n (click)=\"clickOption(option, $event)\"\n >\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </div>\n @if (itemSelected(option)) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\" class=\"margin-left-2\"></teta-icon>\n }\n </div>\n </cdk-virtual-scroll-viewport>\n </teta-scrollable>\n </div>\n } @else {\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <div class=\"list\">\n @for (option of visibleOptions; track option) {\n <div\n [class]=\"'list-item list-item_interactive justify-content-between select_' + viewType\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.list-item_disabled]=\"option.disabled === true\"\n (click)=\"clickOption(option, $event)\"\n >\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </span>\n @if (itemSelected(option) && multiple) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\"></teta-icon>\n }\n </div>\n }\n </div>\n </teta-scrollable>\n }\n } @else {\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n }\n @if (multiple && value?.length) {\n <div class=\"row row_auto select-chip-field flex-wrap\">\n @for (item of value; track item) {\n <div class=\"tag\">\n <p>{{ getText(item) }}</p>\n <teta-icon\n class=\"cursor-pointer\"\n [palette]=\"'text'\"\n [name]=\"'closeCircle'\"\n (click)=\"removeItemClick(item, $event)\"\n ></teta-icon>\n </div>\n }\n </div>\n }\n </div>\n }\n </teta-dropdown>\n <ng-template #notFound>\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n </ng-template>\n <ng-template #optionDefault let-option>\n {{ getText(option) }}\n </ng-template>\n <ng-template #valueDefault let-value>\n @if (multiple) {\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\">\n {{ loc.selected + ' ' + value?.length }}\n </div>\n }\n @if (!multiple) {\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{ getText(value) }}</span>\n }\n </ng-template>\n}\n", styles: [""], dependencies: [{ kind: "component", type: DropdownComponent, selector: "teta-dropdown", exportAs: ["dropdown"] }, { kind: "directive", type: DropdownHeadDirective, selector: "[tetaDropdownHead]" }, { kind: "component", type: IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownContentDirective, selector: "[tetaDropdownContent]" }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ScrollableComponent, selector: "teta-scrollable", inputs: ["direction", "showScrollbars", "contentClass"], outputs: ["scroll"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: ScrollableDirective, selector: "[tetaScrollable]" }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "directive", type: HighlightDirective, selector: "[tetaHighlight]", inputs: ["tetaHighlight"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6038
6043
  }
6039
6044
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SelectComponent, decorators: [{
6040
6045
  type: Component,
@@ -6060,7 +6065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
6060
6065
  CdkVirtualForOf,
6061
6066
  HighlightDirective,
6062
6067
  AsyncPipe,
6063
- ], template: "@if (locale | async; as loc) {\n <teta-dropdown\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n [viewType]=\"viewType\"\n class=\"row row_auto\"\n >\n <div tetaDropdownHead [class]=\"'row row_auto select-head select_' + viewType\" [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n @if (icon) {\n <teta-icon [name]=\"icon\" [palette]=\"'text'\" class=\"margin-right-1\"></teta-icon>\n }\n @if ((value === null || value === undefined || value?.length === 0) && !multiple) {\n <span class=\"placeholder\">\n {{ placeholder || loc.notSelected }}\n </span>\n }\n <ng-container\n *ngTemplateOutlet=\"\n valueDirective ? valueDirective.template : valueDefault;\n context: { $implicit: value, value: value }\n \"\n ></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\" [palette]=\"'text'\"></teta-icon>\n </div>\n @if (options?.length) {\n <div tetaDropdownContent class=\"select-body row_auto\" (click)=\"$event.preventDefault()\">\n @if (searchRef) {\n <div class=\"select-search padding-h-2 padding-top-2\">\n <teta-text-field\n [ngModel]=\"searchText\"\n [class]=\"'select_' + viewType\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"loc.search\"\n [leftIconName]=\"'search'\"\n ></teta-text-field>\n </div>\n }\n @if (visibleOptions?.length) {\n @if (!multiple && allowNull) {\n <div [class]=\"'margin-h-2 list-item list-item_interactive select_' + viewType\" (click)=\"clear()\">\n {{ loc.notSelected }}\n </div>\n <div class=\"list-divider margin-bottom-0\"></div>\n }\n @if (virtual) {\n <div class=\"column column_auto padding-v-2\" style=\"height: 10000px;\">\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <cdk-virtual-scroll-viewport\n tetaScrollable\n [itemSize]=\"28\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\"\n style=\"flex-grow: 1;\">\n <div [class]=\"'margin-h-2 list-item list-item_interactive justify-content-between select_' + viewType\"\n style=\"display: flex;\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0\"\n [class.list-item_active]=\"itemSelected(option)\"\n [tetaHighlight]=\"searchText\"\n (click)=\"clickOption(option, $event)\">\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"optionDirective ? optionDirective.template : optionDefault;context: { $implicit: option, option: option }\"\n >\n </ng-container>\n </div>\n @if (itemSelected(option)) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\" class=\"margin-left-2\"></teta-icon>\n }\n </div>\n </cdk-virtual-scroll-viewport>\n </teta-scrollable>\n </div>\n } @else {\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <div class=\"list\">\n @for (option of visibleOptions; track option) {\n <div\n [class]=\"'list-item list-item_interactive justify-content-between select_' + viewType\"\n [class.list-item_active]=\"itemSelected(option)\"\n (click)=\"clickOption(option, $event)\"\n >\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </span>\n @if (itemSelected(option) && multiple) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\"></teta-icon>\n }\n </div>\n }\n </div>\n </teta-scrollable>\n }\n } @else {\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n }\n @if (multiple && value?.length) {\n <div class=\"row row_auto select-chip-field flex-wrap\">\n @for (item of value; track item) {\n <div class=\"tag\">\n <p>{{ getText(item) }}</p>\n <teta-icon\n class=\"cursor-pointer\"\n [palette]=\"'text'\"\n [name]=\"'closeCircle'\"\n (click)=\"removeItemClick(item, $event)\"\n ></teta-icon>\n </div>\n }\n </div>\n }\n </div>\n }\n </teta-dropdown>\n <ng-template #notFound>\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n </ng-template>\n <ng-template #optionDefault let-option>\n {{ getText(option) }}\n </ng-template>\n <ng-template #valueDefault let-value>\n @if (multiple) {\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\">\n {{ loc.selected + ' ' + value?.length }}\n </div>\n }\n @if (!multiple) {\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{ getText(value) }}</span>\n }\n </ng-template>\n}\n" }]
6068
+ ], template: "@if (locale | async; as loc) {\n <teta-dropdown\n [align]=\"align\"\n [verticalAlign]=\"verticalAlign\"\n [autoClose]=\"autoClose\"\n [autoCloseIgnore]=\"autoCloseIgnore\"\n [(open)]=\"open\"\n [appendToBody]=\"appendToBody\"\n [disabled]=\"disabled\"\n [viewType]=\"viewType\"\n class=\"row row_auto\"\n >\n <div tetaDropdownHead [class]=\"'row row_auto select-head select_' + viewType\" [class.select-head_invalid]=\"invalid\">\n <div class=\"row_auto flex align-center\">\n @if (icon) {\n <teta-icon [name]=\"icon\" [palette]=\"'text'\" class=\"margin-right-1\"></teta-icon>\n }\n @if ((value === null || value === undefined || value?.length === 0) && !multiple) {\n <span class=\"placeholder\">\n {{ placeholder || loc.notSelected }}\n </span>\n }\n <ng-container\n *ngTemplateOutlet=\"\n valueDirective ? valueDirective.template : valueDefault;\n context: { $implicit: value, value: value }\n \"\n ></ng-container>\n </div>\n <teta-icon [name]=\"'arrowDownSmall'\" [palette]=\"'text'\"></teta-icon>\n </div>\n @if (options?.length) {\n <div tetaDropdownContent class=\"select-body row_auto\" (click)=\"$event.preventDefault()\">\n @if (searchRef) {\n <div class=\"select-search padding-h-2 padding-top-2\">\n <teta-text-field\n [ngModel]=\"searchText\"\n [class]=\"'select_' + viewType\"\n (ngModelChange)=\"search($event)\"\n [placeholder]=\"loc.search\"\n [leftIconName]=\"'search'\"\n ></teta-text-field>\n </div>\n }\n @if (visibleOptions?.length) {\n @if (!multiple && allowNull) {\n <div [class]=\"'margin-h-2 list-item list-item_interactive select_' + viewType\" (click)=\"clear()\">\n {{ loc.notSelected }}\n </div>\n <div class=\"list-divider margin-bottom-0\"></div>\n }\n @if (virtual) {\n <div class=\"column column_auto padding-v-2\" style=\"height: 50vh\">\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <cdk-virtual-scroll-viewport\n tetaScrollable\n [itemSize]=\"28\"\n minBufferPx=\"200\"\n maxBufferPx=\"600\"\n style=\"flex-grow: 1\"\n >\n <div\n [class]=\"'margin-h-2 list-item list-item_interactive justify-content-between select_' + viewType\"\n style=\"display: flex\"\n *cdkVirtualFor=\"let option of visibleOptions; templateCacheSize: 0\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.list-item_disabled]=\"option.disabled === true\"\n [tetaHighlight]=\"searchText\"\n [style.height.px]=\"28\"\n (click)=\"clickOption(option, $event)\"\n >\n <div [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </div>\n @if (itemSelected(option)) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\" class=\"margin-left-2\"></teta-icon>\n }\n </div>\n </cdk-virtual-scroll-viewport>\n </teta-scrollable>\n </div>\n } @else {\n <teta-scrollable class=\"column column_auto\" [contentClass]=\"['column', 'column_auto']\">\n <div class=\"list\">\n @for (option of visibleOptions; track option) {\n <div\n [class]=\"'list-item list-item_interactive justify-content-between select_' + viewType\"\n [class.list-item_active]=\"itemSelected(option)\"\n [class.list-item_disabled]=\"option.disabled === true\"\n (click)=\"clickOption(option, $event)\"\n >\n <span [tetaHighlight]=\"searchText\">\n <ng-container\n *ngTemplateOutlet=\"\n optionDirective ? optionDirective.template : optionDefault;\n context: { $implicit: option, option: option }\n \"\n >\n </ng-container>\n </span>\n @if (itemSelected(option) && multiple) {\n <teta-icon [name]=\"'tick'\" [palette]=\"'text'\"></teta-icon>\n }\n </div>\n }\n </div>\n </teta-scrollable>\n }\n } @else {\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n }\n @if (multiple && value?.length) {\n <div class=\"row row_auto select-chip-field flex-wrap\">\n @for (item of value; track item) {\n <div class=\"tag\">\n <p>{{ getText(item) }}</p>\n <teta-icon\n class=\"cursor-pointer\"\n [palette]=\"'text'\"\n [name]=\"'closeCircle'\"\n (click)=\"removeItemClick(item, $event)\"\n ></teta-icon>\n </div>\n }\n </div>\n }\n </div>\n }\n </teta-dropdown>\n <ng-template #notFound>\n <p class=\"padding-h-3 text-overflow-ellipsis overflow-hidden select-not-found-option\">\n {{ notFoundText || loc.notFound }}\n </p>\n </ng-template>\n <ng-template #optionDefault let-option>\n {{ getText(option) }}\n </ng-template>\n <ng-template #valueDefault let-value>\n @if (multiple) {\n <div class=\"row_auto overflow-hidden text-overflow-ellipsis\">\n {{ loc.selected + ' ' + value?.length }}\n </div>\n }\n @if (!multiple) {\n <span class=\"row row_auto overflow-hidden text-overflow-ellipsis\">{{ getText(value) }}</span>\n }\n </ng-template>\n}\n" }]
6064
6069
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: TetaConfigService }], propDecorators: { multiple: [{
6065
6070
  type: HostBinding,
6066
6071
  args: ['class.select_multiple']
@@ -6256,7 +6261,7 @@ class PropertyGridItemComponent {
6256
6261
  }
6257
6262
  }
6258
6263
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyGridItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6259
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PropertyGridItemComponent, isStandalone: true, selector: "teta-property-grid-item", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "directive", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: ["tetaDisableControl"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay", "viewType", "overflownOnly"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6264
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PropertyGridItemComponent, isStandalone: true, selector: "teta-property-grid-item", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, hideNonEditable: { classPropertyName: "hideNonEditable", publicName: "hideNonEditable", isSignal: true, isRequired: false, transformFunction: null }, dict: { classPropertyName: "dict", publicName: "dict", isSignal: true, isRequired: false, transformFunction: null }, decimalPart: { classPropertyName: "decimalPart", publicName: "decimalPart", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlValueChange: "controlValueChange" }, usesOnChanges: true, ngImport: i0, template: "@if (editable() || !hideNonEditable()) {\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: {\n $implicit: formGroup?.get(column().name),\n control:formGroup?.get(column().name),\n column: column()\n }\"\n ></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n <teta-input [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal() || column().filterType === filterTypeEnum.color\"\n [required]=\"column().required\">\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\n {{ column().caption }}\n </teta-toggle>\n }\n @case (filterTypeEnum.color) {\n <teta-color-input\n class=\"border border-text-20 border-radius-4 padding-1\"\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\">\n </teta-color-input>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-text-field>\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n }\n }\n}\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "teta-input", inputs: ["label", "hint", "viewType", "horizontal", "required"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: DatePickerComponent, selector: "teta-date-picker", inputs: ["date", "showTime", "minDate", "maxDate", "invalid", "disabled", "align", "verticalAlign", "viewType", "appendToBody", "backdrop", "allowNull", "firstDayOfWeek", "disabledDates", "disabledPeriods", "disabledDays", "minYearDate", "maxYearDate"], outputs: ["selectDate"] }, { kind: "component", type: ToggleComponent, selector: "teta-toggle", inputs: ["palette", "noLabel", "disabled"] }, { kind: "component", type: TextFieldComponent, selector: "teta-text-field", inputs: ["placeholder", "leftIconName", "disabled", "onlyNumber", "decimalPart", "invalid"] }, { kind: "directive", type: DisableControlDirective, selector: "[tetaDisableControl]", inputs: ["tetaDisableControl"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay", "viewType", "overflownOnly"] }, { kind: "component", type: ColorInputComponent, selector: "teta-color-input", inputs: ["disabled"] }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6260
6265
  }
6261
6266
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyGridItemComponent, decorators: [{
6262
6267
  type: Component,
@@ -6271,7 +6276,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
6271
6276
  TextFieldComponent,
6272
6277
  DisableControlDirective,
6273
6278
  HintDirective,
6274
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (editable() || !hideNonEditable()) {\n <teta-input\n [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal()\"\n [required]=\"column().required\"\n >\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: { $implicit: formGroup?.get(column().name) }\"\n ></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\n {{ column().caption }}\n </teta-toggle>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-text-field>\n }\n }\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n}\n" }]
6279
+ ColorInputComponent,
6280
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (editable() || !hideNonEditable()) {\n @if (template()) {\n <ng-container\n *ngTemplateOutlet=\"template().template; context: {\n $implicit: formGroup?.get(column().name),\n control:formGroup?.get(column().name),\n column: column()\n }\"\n ></ng-container>\n } @else {\n @if (formGroup?.get(column().name)) {\n <teta-input [label]=\"caption()\"\n [hint]=\"hint()\"\n [formGroup]=\"formGroup\"\n [horizontal]=\"horizontal() || column().filterType === filterTypeEnum.color\"\n [required]=\"column().required\">\n @switch (column().filterType) {\n @case (filterTypeEnum.list) {\n <teta-select\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-select>\n }\n @case (filterTypeEnum.date) {\n <teta-date-picker\n class=\"row_auto\"\n [appendToBody]=\"true\"\n [tetaDisableControl]=\"!editable()\"\n [invalid]=\"controlIsInvalid(column().name)\"\n [formControlName]=\"column().name\"\n ></teta-date-picker>\n }\n @case (filterTypeEnum.boolean) {\n <teta-toggle\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\"\n [tetaHint]=\"hint()\"\n [align]=\"align.left\"\n >\n {{ column().caption }}\n </teta-toggle>\n }\n @case (filterTypeEnum.color) {\n <teta-color-input\n class=\"border border-text-20 border-radius-4 padding-1\"\n [tetaDisableControl]=\"!editable()\"\n [formControlName]=\"column().name\">\n </teta-color-input>\n }\n @default {\n <teta-text-field\n class=\"row_auto\"\n [tetaDisableControl]=\"!editable()\"\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\"\n ></teta-text-field>\n }\n }\n @if (controlIsInvalid(column().name)) {\n <div ngProjectAs=\"message\" class=\"color-red-50\">\n {{ getError(column()) }}\n </div>\n }\n </teta-input>\n }\n }\n}\n" }]
6275
6281
  }] });
6276
6282
 
6277
6283
  class PropertyGridGroupComponent {
@@ -7974,12 +7980,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
7974
7980
  args: ['input', { static: false }]
7975
7981
  }] } });
7976
7982
 
7983
+ class ColorUtil {
7984
+ static getHexColor(color) {
7985
+ if (color && color.startsWith('rgb')) {
7986
+ const value = color.substring(color.indexOf('(') + 1, color.lastIndexOf(')'));
7987
+ const colorArray = value.split(',');
7988
+ color = `#${('00' + parseInt(colorArray[0], 10).toString(16)).slice(-2)}${('00' + parseInt(colorArray[1], 10).toString(16)).slice(-2)}${('00' + parseInt(colorArray[2], 10).toString(16)).slice(-2)}`;
7989
+ }
7990
+ return color;
7991
+ }
7992
+ }
7993
+
7994
+ class ColorCellComponent extends CellComponentBase {
7995
+ focus(event) {
7996
+ this.svc.startEditCell({
7997
+ row: this.index,
7998
+ column: this.column.name,
7999
+ event: event,
8000
+ });
8001
+ }
8002
+ constructor(svc, cdr) {
8003
+ super(svc, cdr);
8004
+ this.svc = svc;
8005
+ this.cdr = cdr;
8006
+ this.tabindex = 0;
8007
+ }
8008
+ setValue() {
8009
+ this.svc.startEditCell(null);
8010
+ }
8011
+ startEdit(initiator, type) {
8012
+ if (initiator?.column === this.column.name) {
8013
+ this.cdr.detectChanges();
8014
+ this.input.nativeElement?.focus();
8015
+ this.input.nativeElement?.click();
8016
+ }
8017
+ }
8018
+ stopEdit() {
8019
+ this.cdr.detectChanges();
8020
+ }
8021
+ getHexColor(color) {
8022
+ return ColorUtil.getHexColor(color);
8023
+ }
8024
+ ngOnInit() {
8025
+ super.ngOnInit();
8026
+ }
8027
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ColorCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
8028
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ColorCellComponent, isStandalone: true, selector: "teta-color-cell", host: { listeners: { "focus": "focus($event)", "focusin": "focus($event)" }, properties: { "attr.tabindex": "this.tabindex" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<input\n type=\"color\"\n #input\n [name]=\"column.name\"\n [disabled]=\"!editable\"\n (blur)=\"setValue()\"\n [ngModel]=\"getHexColor(row.data[column.name])\"\n (ngModelChange)=\"row.data[column.name] = $event\" />\n", styles: [":host{display:flex;align-items:center;justify-content:center}input[type=color]{height:16px;width:16px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8029
+ }
8030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ColorCellComponent, decorators: [{
8031
+ type: Component,
8032
+ args: [{ selector: 'teta-color-cell', imports: [FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<input\n type=\"color\"\n #input\n [name]=\"column.name\"\n [disabled]=\"!editable\"\n (blur)=\"setValue()\"\n [ngModel]=\"getHexColor(row.data[column.name])\"\n (ngModelChange)=\"row.data[column.name] = $event\" />\n", styles: [":host{display:flex;align-items:center;justify-content:center}input[type=color]{height:16px;width:16px;padding:0;border:0}input[type=color]::-webkit-color-swatch,input[type=color]::-webkit-color-swatch-wrapper{border:0;padding:0}\n"] }]
8033
+ }], ctorParameters: () => [{ type: TableService }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
8034
+ type: ViewChild,
8035
+ args: ['input', { static: false }]
8036
+ }], tabindex: [{
8037
+ type: HostBinding,
8038
+ args: ['attr.tabindex']
8039
+ }], focus: [{
8040
+ type: HostListener,
8041
+ args: ['focus', ['$event']]
8042
+ }, {
8043
+ type: HostListener,
8044
+ args: ['focusin', ['$event']]
8045
+ }] } });
8046
+
7977
8047
  const cellComponentsMap = new Map()
7978
8048
  .set(FilterType.number, NumericCellComponent)
7979
8049
  .set(FilterType.date, DateCellComponent)
7980
8050
  .set(FilterType.list, ListCellComponent)
7981
8051
  .set(FilterType.string, StringCellComponent)
7982
8052
  .set(FilterType.boolean, BooleanCellComponent)
8053
+ .set(FilterType.color, ColorCellComponent)
7983
8054
  .set(FilterType.custom, StringCellComponent);
7984
8055
  const getCellComponent = (column) => cellComponentsMap.has(column.filterType) ? cellComponentsMap.get(column.filterType) : StringCellComponent;
7985
8056
 
@@ -11627,5 +11698,5 @@ function tetaZoneOptimized(ngZone) {
11627
11698
  * Generated bundle index. Do not edit.
11628
11699
  */
11629
11700
 
11630
- export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, PrependZeroPipe, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective, RadioButtonComponent, RadioComponent, RangeCalendarComponent, ResizeDragDirective, ResizePanelComponent, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollableComponent, ScrollableDirective, SelectComponent, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarPosition, SortEvent, SortParam, StateUtil, StepperComponent, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableRow, TableRowComponent, TableService, TableUtil, TabsComponent, TetaConfigService, TetaContentRef, TetaDatePipe, TetaSize, TetaTemplateDirective, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchService, ToggleComponent, ToolbarComponent, TooltipDirective, TreeComponent, TreeItemToggleComponent, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
11701
+ export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorCellComponent, ColorInputComponent, ColorUtil, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, PrependZeroPipe, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective, RadioButtonComponent, RadioComponent, RangeCalendarComponent, ResizeDragDirective, ResizePanelComponent, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollableComponent, ScrollableDirective, SelectComponent, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarPosition, SortEvent, SortParam, StateUtil, StepperComponent, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableRow, TableRowComponent, TableService, TableUtil, TabsComponent, TetaConfigService, TetaContentRef, TetaDatePipe, TetaSize, TetaTemplateDirective, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchService, ToggleComponent, ToolbarComponent, TooltipDirective, TreeComponent, TreeItemToggleComponent, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
11631
11702
  //# sourceMappingURL=tetacom-ng-components.mjs.map