@tetacom/ng-components 1.0.75 → 1.0.76

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.
@@ -5116,16 +5116,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
5116
5116
  }]
5117
5117
  }] });
5118
5118
 
5119
+ class ColorInputComponent {
5120
+ constructor(_cdr) {
5121
+ this._cdr = _cdr;
5122
+ this.disabled = false;
5123
+ this.value = '';
5124
+ }
5125
+ onFocus() {
5126
+ if (this.disabled) {
5127
+ return;
5128
+ }
5129
+ this.input.nativeElement.focus();
5130
+ }
5131
+ emitBlur() {
5132
+ this.onTouched();
5133
+ }
5134
+ registerOnChange(fn) {
5135
+ this.onChange = fn;
5136
+ }
5137
+ registerOnTouched(fn) {
5138
+ this.onTouched = fn;
5139
+ }
5140
+ setDisabledState(isDisabled) {
5141
+ this.disabled = isDisabled;
5142
+ this._cdr.markForCheck();
5143
+ }
5144
+ writeValue(input) {
5145
+ this.value = input;
5146
+ this._cdr.detectChanges();
5147
+ }
5148
+ onChange(input) {
5149
+ }
5150
+ onTouched() {
5151
+ }
5152
+ getHexColor(color) {
5153
+ if (color?.startsWith('rgb')) {
5154
+ const value = color.substring(color.indexOf('(') + 1, color.lastIndexOf(')'));
5155
+ const colorArray = value.split(',');
5156
+ return `#${parseInt(colorArray[0], 10).toString(16)}${parseInt(colorArray[1], 10).toString(16)}${parseInt(colorArray[2], 10).toString(16)}`;
5157
+ }
5158
+ return color;
5159
+ }
5160
+ }
5161
+ ColorInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ColorInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5162
+ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ColorInputComponent, selector: "teta-color-input", inputs: { disabled: "disabled" }, host: { listeners: { "click": "onFocus()" } }, providers: [
5163
+ {
5164
+ provide: NG_VALUE_ACCESSOR,
5165
+ useExisting: forwardRef(() => ColorInputComponent),
5166
+ multi: true,
5167
+ },
5168
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input 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", 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: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ColorInputComponent, decorators: [{
5170
+ type: Component,
5171
+ args: [{ selector: 'teta-color-input', providers: [
5172
+ {
5173
+ provide: NG_VALUE_ACCESSOR,
5174
+ useExisting: forwardRef(() => ColorInputComponent),
5175
+ multi: true,
5176
+ },
5177
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<input 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", 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"] }]
5178
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
5179
+ type: Input
5180
+ }], input: [{
5181
+ type: ViewChild,
5182
+ args: ['input', { static: false }]
5183
+ }], onFocus: [{
5184
+ type: HostListener,
5185
+ args: ['click']
5186
+ }] } });
5187
+
5119
5188
  class InputModule {
5120
5189
  }
5121
5190
  InputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: InputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5122
- InputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: InputModule, declarations: [InputComponent, TextFieldComponent, FormGroupTitleComponent], imports: [CommonModule, IconModule, FormsModule, OnlyNumberModule, HintModule], exports: [InputComponent, TextFieldComponent, FormGroupTitleComponent] });
5191
+ InputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: InputModule, declarations: [InputComponent, TextFieldComponent, FormGroupTitleComponent, ColorInputComponent], imports: [CommonModule, IconModule, FormsModule, OnlyNumberModule, HintModule], exports: [InputComponent, TextFieldComponent, FormGroupTitleComponent, ColorInputComponent] });
5123
5192
  InputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: InputModule, imports: [CommonModule, IconModule, FormsModule, OnlyNumberModule, HintModule] });
5124
5193
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: InputModule, decorators: [{
5125
5194
  type: NgModule,
5126
5195
  args: [{
5127
- declarations: [InputComponent, TextFieldComponent, FormGroupTitleComponent],
5128
- exports: [InputComponent, TextFieldComponent, FormGroupTitleComponent],
5196
+ declarations: [InputComponent, TextFieldComponent, FormGroupTitleComponent, ColorInputComponent],
5197
+ exports: [InputComponent, TextFieldComponent, FormGroupTitleComponent, ColorInputComponent],
5129
5198
  imports: [CommonModule, IconModule, FormsModule, OnlyNumberModule, HintModule],
5130
5199
  }]
5131
5200
  }] });
@@ -8727,13 +8796,13 @@ class TreeComponent {
8727
8796
  this._service.scrollToIndex.pipe(takeWhile(() => this._alive)).subscribe((index) => {
8728
8797
  this._zone.runOutsideAngular(() => {
8729
8798
  setTimeout(() => {
8730
- this.virtualScroll.scrollToIndex(index, 'smooth');
8799
+ this.virtualScroll?.scrollToIndex(index, 'smooth');
8731
8800
  });
8732
8801
  });
8733
8802
  });
8734
8803
  }
8735
8804
  hasChildren(data) {
8736
- return data.some((_) => _[this.childNodeName]?.length > 0);
8805
+ return data?.some((_) => _[this.childNodeName]?.length > 0);
8737
8806
  }
8738
8807
  getDisplayData(data, level) {
8739
8808
  const result = [];
@@ -12307,5 +12376,5 @@ function tetaZoneOptimized(ngZone) {
12307
12376
  * Generated bundle index. Do not edit.
12308
12377
  */
12309
12378
 
12310
- export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutoPositionModule, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, ExportType, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollIntoViewModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
12379
+ export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutoPositionModule, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColorInputComponent, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, ExportType, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollIntoViewModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
12311
12380
  //# sourceMappingURL=tetacom-ng-components.mjs.map