@tetacom/ng-components 1.7.5 → 1.7.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tetacom/ng-components",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
package/style/hint.scss CHANGED
@@ -13,4 +13,9 @@
13
13
  border-radius: 8px;
14
14
  pointer-events: none;
15
15
  @include getView('base');
16
+
17
+ &_error {
18
+ background-color: var(--color-red-50);
19
+ color: var(--color-global-white);
20
+ }
16
21
  }
@@ -1885,10 +1885,13 @@ declare class TableService<T> {
1885
1885
  declare abstract class CellComponentBase<T> implements OnInit, OnDestroy {
1886
1886
  protected svc: TableService<T>;
1887
1887
  protected cdr: ChangeDetectorRef;
1888
+ private transloco;
1889
+ private hint;
1888
1890
  private _formGroup;
1889
1891
  readonly cellClass = true;
1890
1892
  get cellInvalid(): boolean;
1891
1893
  get control(): FormControl;
1894
+ get validationHint(): string | null;
1892
1895
  protected _column: TableColumn;
1893
1896
  set column(column: TableColumn);
1894
1897
  get column(): TableColumn;
@@ -1911,6 +1914,10 @@ declare abstract class CellComponentBase<T> implements OnInit, OnDestroy {
1911
1914
  private setupControl;
1912
1915
  private start;
1913
1916
  private stop;
1917
+ private setupValidationHint;
1918
+ private updateValidationHint;
1919
+ private getValidationHint;
1920
+ private translate;
1914
1921
  static ɵfac: i0.ɵɵFactoryDeclaration<CellComponentBase<any>, never>;
1915
1922
  static ɵcmp: i0.ɵɵComponentDeclaration<CellComponentBase<any>, "ng-component", never, {}, {}, never, never, false, never>;
1916
1923
  }
@@ -2547,6 +2554,58 @@ declare class CellHostComponent<T> implements OnInit, OnChanges {
2547
2554
  static ɵcmp: i0.ɵɵComponentDeclaration<CellHostComponent<any>, "teta-cell-host", never, { "column": { "alias": "column"; "required": false; }; "row": { "alias": "row"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "dict": { "alias": "dict"; "required": false; }; }, {}, never, never, true, never>;
2548
2555
  }
2549
2556
 
2557
+ declare abstract class DynamicContentBaseDirective implements OnDestroy {
2558
+ protected _document: Document;
2559
+ protected _elementRef: ElementRef<any>;
2560
+ protected _service: DynamicComponentService;
2561
+ protected _injector: Injector;
2562
+ protected _zone: NgZone;
2563
+ protected _cdr: ChangeDetectorRef;
2564
+ data: any;
2565
+ className?: string | string[];
2566
+ align: Align;
2567
+ verticalAlign: VerticalAlign;
2568
+ appendToBody: boolean;
2569
+ set open(open: boolean);
2570
+ openChange: EventEmitter<boolean>;
2571
+ protected _alive: boolean;
2572
+ protected _componentRef?: ComponentRef<any> | null;
2573
+ protected _content?: TetaContentRef;
2574
+ protected _open: boolean;
2575
+ protected abstract get _dynamicContent(): string | TemplateRef<any> | Type<any> | null | undefined;
2576
+ protected constructor();
2577
+ ngOnDestroy(): void;
2578
+ protected createContentRef<T>(className?: string | string[]): ComponentRef<T>;
2579
+ protected destroyContentRef(): void;
2580
+ protected abstract setPosition(): void;
2581
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentBaseDirective, never>;
2582
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentBaseDirective, never, never, { "data": { "alias": "data"; "required": false; }; "className": { "alias": "className"; "required": false; }; "align": { "alias": "align"; "required": false; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, never, never, true, never>;
2583
+ }
2584
+
2585
+ declare class HintDirective extends DynamicContentBaseDirective implements OnDestroy {
2586
+ /**
2587
+ * Строка, шаблон или компонент для создания контекстного меню
2588
+ */
2589
+ tetaHint?: string | TemplateRef<any> | Type<any>;
2590
+ align: Align;
2591
+ verticalAlign: VerticalAlign;
2592
+ delay: number;
2593
+ viewType: viewType;
2594
+ overflownOnly: boolean;
2595
+ get _dynamicContent(): string | Type<any> | TemplateRef<any>;
2596
+ private _timeout?;
2597
+ private _componentRect;
2598
+ constructor();
2599
+ mouseenter(): void;
2600
+ mouseleave(): void;
2601
+ click(event: MouseEvent): void;
2602
+ protected setPosition(): void;
2603
+ private createHint;
2604
+ ngOnDestroy(): void;
2605
+ static ɵfac: i0.ɵɵFactoryDeclaration<HintDirective, never>;
2606
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HintDirective, "[tetaHint]", never, { "tetaHint": { "alias": "tetaHint"; "required": false; }; "align": { "alias": "align"; "required": false; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "viewType": { "alias": "viewType"; "required": false; }; "overflownOnly": { "alias": "overflownOnly"; "required": false; }; }, {}, never, never, true, never>;
2607
+ }
2608
+
2550
2609
  declare class DateCellComponent<T> extends CellComponentBase<T> implements OnInit {
2551
2610
  input: DatePickerComponent;
2552
2611
  open: i0.WritableSignal<boolean>;
@@ -2554,7 +2613,7 @@ declare class DateCellComponent<T> extends CellComponentBase<T> implements OnIni
2554
2613
  startEdit(initiator: ICellCoordinates, type: 'cell' | 'row'): void;
2555
2614
  stopEdit(): void;
2556
2615
  static ɵfac: i0.ɵɵFactoryDeclaration<DateCellComponent<any>, never>;
2557
- static ɵcmp: i0.ɵɵComponentDeclaration<DateCellComponent<any>, "teta-date-cell", never, {}, {}, never, never, true, never>;
2616
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateCellComponent<any>, "teta-date-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2558
2617
  }
2559
2618
 
2560
2619
  declare class BooleanCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2563,7 +2622,7 @@ declare class BooleanCellComponent<T> extends CellComponentBase<T> implements On
2563
2622
  startEdit(initiator: ICellCoordinates, type: 'cell' | 'row'): void;
2564
2623
  stopEdit(): void;
2565
2624
  static ɵfac: i0.ɵɵFactoryDeclaration<BooleanCellComponent<any>, never>;
2566
- static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCellComponent<any>, "teta-boolean-cell", never, {}, {}, never, never, true, never>;
2625
+ static ɵcmp: i0.ɵɵComponentDeclaration<BooleanCellComponent<any>, "teta-boolean-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2567
2626
  }
2568
2627
 
2569
2628
  declare class ColorCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2576,7 +2635,7 @@ declare class ColorCellComponent<T> extends CellComponentBase<T> implements OnIn
2576
2635
  getHexColor(color: string): string;
2577
2636
  ngOnInit(): void;
2578
2637
  static ɵfac: i0.ɵɵFactoryDeclaration<ColorCellComponent<any>, never>;
2579
- static ɵcmp: i0.ɵɵComponentDeclaration<ColorCellComponent<any>, "teta-color-cell", never, {}, {}, never, never, true, never>;
2638
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColorCellComponent<any>, "teta-color-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2580
2639
  }
2581
2640
 
2582
2641
  declare class DateTimeCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2586,7 +2645,7 @@ declare class DateTimeCellComponent<T> extends CellComponentBase<T> implements O
2586
2645
  startEdit(initiator: ICellCoordinates, type: 'cell' | 'row'): void;
2587
2646
  stopEdit(): void;
2588
2647
  static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeCellComponent<any>, never>;
2589
- static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeCellComponent<any>, "teta-date-time-cell", never, {}, {}, never, never, true, never>;
2648
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimeCellComponent<any>, "teta-date-time-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2590
2649
  }
2591
2650
 
2592
2651
  declare class ListCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2599,7 +2658,7 @@ declare class ListCellComponent<T> extends CellComponentBase<T> implements OnIni
2599
2658
  ngOnInit(): void;
2600
2659
  protected getValue(value: any): string;
2601
2660
  static ɵfac: i0.ɵɵFactoryDeclaration<ListCellComponent<any>, never>;
2602
- static ɵcmp: i0.ɵɵComponentDeclaration<ListCellComponent<any>, "teta-list-cell", never, {}, {}, never, never, true, never>;
2661
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListCellComponent<any>, "teta-list-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2603
2662
  }
2604
2663
 
2605
2664
  declare class NumericCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2608,7 +2667,7 @@ declare class NumericCellComponent<T> extends CellComponentBase<T> implements On
2608
2667
  startEdit(initiator: ICellCoordinates, type: 'cell' | 'row'): void;
2609
2668
  stopEdit(): void;
2610
2669
  static ɵfac: i0.ɵɵFactoryDeclaration<NumericCellComponent<any>, never>;
2611
- static ɵcmp: i0.ɵɵComponentDeclaration<NumericCellComponent<any>, "teta-numeric-cell", never, {}, {}, never, never, true, never>;
2670
+ static ɵcmp: i0.ɵɵComponentDeclaration<NumericCellComponent<any>, "teta-numeric-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2612
2671
  }
2613
2672
 
2614
2673
  declare class StringCellComponent<T> extends CellComponentBase<T> implements OnInit {
@@ -2618,7 +2677,7 @@ declare class StringCellComponent<T> extends CellComponentBase<T> implements OnI
2618
2677
  startEdit(initiator: ICellCoordinates, type: 'cell' | 'row'): void;
2619
2678
  stopEdit(): void;
2620
2679
  static ɵfac: i0.ɵɵFactoryDeclaration<StringCellComponent<any>, never>;
2621
- static ɵcmp: i0.ɵɵComponentDeclaration<StringCellComponent<any>, "teta-string-cell", never, {}, {}, never, never, true, never>;
2680
+ static ɵcmp: i0.ɵɵComponentDeclaration<StringCellComponent<any>, "teta-string-cell", never, {}, {}, never, never, true, [{ directive: typeof HintDirective; inputs: {}; outputs: {}; }]>;
2622
2681
  }
2623
2682
 
2624
2683
  declare abstract class HeadCellComponentBase<T> {
@@ -2952,34 +3011,6 @@ declare class ClickOutsideDirective implements OnDestroy {
2952
3011
  static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[tetaClickOutside]", never, { "rightClick": { "alias": "rightClick"; "required": false; }; "tetaClickOutside": { "alias": "tetaClickOutside"; "required": false; }; }, { "clickOutside": "clickOutside"; }, never, never, true, never>;
2953
3012
  }
2954
3013
 
2955
- declare abstract class DynamicContentBaseDirective implements OnDestroy {
2956
- protected _document: Document;
2957
- protected _elementRef: ElementRef<any>;
2958
- protected _service: DynamicComponentService;
2959
- protected _injector: Injector;
2960
- protected _zone: NgZone;
2961
- protected _cdr: ChangeDetectorRef;
2962
- data: any;
2963
- className?: string | string[];
2964
- align: Align;
2965
- verticalAlign: VerticalAlign;
2966
- appendToBody: boolean;
2967
- set open(open: boolean);
2968
- openChange: EventEmitter<boolean>;
2969
- protected _alive: boolean;
2970
- protected _componentRef?: ComponentRef<any> | null;
2971
- protected _content?: TetaContentRef;
2972
- protected _open: boolean;
2973
- protected abstract get _dynamicContent(): string | TemplateRef<any> | Type<any> | null | undefined;
2974
- protected constructor();
2975
- ngOnDestroy(): void;
2976
- protected createContentRef<T>(className?: string | string[]): ComponentRef<T>;
2977
- protected destroyContentRef(): void;
2978
- protected abstract setPosition(): void;
2979
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentBaseDirective, never>;
2980
- static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentBaseDirective, never, never, { "data": { "alias": "data"; "required": false; }; "className": { "alias": "className"; "required": false; }; "align": { "alias": "align"; "required": false; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, never, never, true, never>;
2981
- }
2982
-
2983
3014
  declare class ContextMenuDirective extends DynamicContentBaseDirective implements OnDestroy {
2984
3015
  private _click;
2985
3016
  /**
@@ -3238,30 +3269,6 @@ declare class HighlightDirective {
3238
3269
  static ɵdir: i0.ɵɵDirectiveDeclaration<HighlightDirective, "[tetaHighlight]", never, { "tetaHighlight": { "alias": "tetaHighlight"; "required": false; }; }, {}, never, never, true, never>;
3239
3270
  }
3240
3271
 
3241
- declare class HintDirective extends DynamicContentBaseDirective implements OnDestroy {
3242
- /**
3243
- * Строка, шаблон или компонент для создания контекстного меню
3244
- */
3245
- tetaHint?: string | TemplateRef<any> | Type<any>;
3246
- align: Align;
3247
- verticalAlign: VerticalAlign;
3248
- delay: number;
3249
- viewType: viewType;
3250
- overflownOnly: boolean;
3251
- get _dynamicContent(): string | Type<any> | TemplateRef<any>;
3252
- private _timeout?;
3253
- private _componentRect;
3254
- constructor();
3255
- mouseenter(): void;
3256
- mouseleave(): void;
3257
- click(event: MouseEvent): void;
3258
- protected setPosition(): void;
3259
- private createHint;
3260
- ngOnDestroy(): void;
3261
- static ɵfac: i0.ɵɵFactoryDeclaration<HintDirective, never>;
3262
- static ɵdir: i0.ɵɵDirectiveDeclaration<HintDirective, "[tetaHint]", never, { "tetaHint": { "alias": "tetaHint"; "required": false; }; "align": { "alias": "align"; "required": false; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "viewType": { "alias": "viewType"; "required": false; }; "overflownOnly": { "alias": "overflownOnly"; "required": false; }; }, {}, never, never, true, never>;
3263
- }
3264
-
3265
3272
  declare class LoaderDirective implements OnDestroy {
3266
3273
  private _elementRef;
3267
3274
  private _renderer;