cps-ui-kit 17.26.0 → 17.28.0

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.
Files changed (45) hide show
  1. package/assets/icons.svg +5 -6
  2. package/esm2022/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +40 -16
  3. package/esm2022/lib/components/cps-button/cps-button.component.mjs +15 -8
  4. package/esm2022/lib/components/cps-button-toggle/cps-button-toggle.component.mjs +11 -7
  5. package/esm2022/lib/components/cps-checkbox/cps-checkbox.component.mjs +10 -6
  6. package/esm2022/lib/components/cps-divider/cps-divider.component.mjs +29 -15
  7. package/esm2022/lib/components/cps-expansion-panel/cps-expansion-panel.component.mjs +12 -8
  8. package/esm2022/lib/components/cps-icon/cps-icon.component.mjs +13 -9
  9. package/esm2022/lib/components/cps-input/cps-input.component.mjs +3 -3
  10. package/esm2022/lib/components/cps-loader/cps-loader.component.mjs +12 -7
  11. package/esm2022/lib/components/cps-menu/cps-menu.component.mjs +39 -19
  12. package/esm2022/lib/components/cps-paginator/cps-paginator.component.mjs +12 -7
  13. package/esm2022/lib/components/cps-progress-circular/cps-progress-circular.component.mjs +12 -7
  14. package/esm2022/lib/components/cps-progress-linear/cps-progress-linear.component.mjs +13 -8
  15. package/esm2022/lib/components/cps-tab-group/cps-tab-group.component.mjs +12 -8
  16. package/esm2022/lib/components/cps-table/cps-table.component.mjs +11 -7
  17. package/esm2022/lib/components/cps-tag/cps-tag.component.mjs +10 -6
  18. package/esm2022/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.mjs +31 -9
  19. package/esm2022/lib/components/cps-tree-table/cps-tree-table.component.mjs +17 -12
  20. package/esm2022/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.mjs +11 -6
  21. package/esm2022/lib/directives/cps-tooltip/cps-tooltip.directive.mjs +28 -23
  22. package/esm2022/lib/utils/colors-utils.mjs +10 -8
  23. package/fesm2022/cps-ui-kit.mjs +295 -146
  24. package/fesm2022/cps-ui-kit.mjs.map +1 -1
  25. package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +9 -5
  26. package/lib/components/cps-button/cps-button.component.d.ts +2 -0
  27. package/lib/components/cps-button-toggle/cps-button-toggle.component.d.ts +3 -2
  28. package/lib/components/cps-checkbox/cps-checkbox.component.d.ts +3 -2
  29. package/lib/components/cps-divider/cps-divider.component.d.ts +16 -3
  30. package/lib/components/cps-expansion-panel/cps-expansion-panel.component.d.ts +2 -1
  31. package/lib/components/cps-icon/cps-icon.component.d.ts +2 -0
  32. package/lib/components/cps-loader/cps-loader.component.d.ts +2 -0
  33. package/lib/components/cps-menu/cps-menu.component.d.ts +21 -3
  34. package/lib/components/cps-paginator/cps-paginator.component.d.ts +2 -0
  35. package/lib/components/cps-progress-circular/cps-progress-circular.component.d.ts +2 -0
  36. package/lib/components/cps-progress-linear/cps-progress-linear.component.d.ts +2 -0
  37. package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +2 -1
  38. package/lib/components/cps-table/cps-table.component.d.ts +2 -1
  39. package/lib/components/cps-tag/cps-tag.component.d.ts +3 -2
  40. package/lib/components/cps-tree-autocomplete/cps-tree-autocomplete.component.d.ts +9 -4
  41. package/lib/components/cps-tree-table/cps-tree-table.component.d.ts +4 -2
  42. package/lib/components/cps-tree-table/directives/cps-tree-table-row-toggler.directive.d.ts +2 -1
  43. package/lib/directives/cps-tooltip/cps-tooltip.directive.d.ts +3 -1
  44. package/lib/utils/colors-utils.d.ts +2 -2
  45. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { IconType, iconSizeType } from '../cps-icon/cps-icon.component';
4
4
  import { LabelByValuePipe } from '../../pipes/internal/label-by-value.pipe';
5
5
  import { VirtualScroller } from 'primeng/virtualscroller';
6
6
  import { CpsTooltipPosition } from '../../directives/cps-tooltip/cps-tooltip.directive';
7
- import { CpsMenuComponent } from '../cps-menu/cps-menu.component';
7
+ import { CpsMenuComponent, CpsMenuHideReason } from '../cps-menu/cps-menu.component';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * CpsAutocompleteAppearanceType is used to define the border of the autocomplete input.
@@ -17,6 +17,8 @@ export type CpsAutocompleteAppearanceType = 'outlined' | 'underlined' | 'borderl
17
17
  */
18
18
  export declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit, OnDestroy {
19
19
  private _control;
20
+ private document;
21
+ private cdRef;
20
22
  private _labelByValue;
21
23
  /**
22
24
  * Label of the autocomplete component.
@@ -260,6 +262,7 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
260
262
  virtualList: VirtualScroller;
261
263
  optionsMenu: CpsMenuComponent;
262
264
  optionsList: ElementRef;
265
+ autocompleteInput: ElementRef;
263
266
  error: string;
264
267
  cvtWidth: string;
265
268
  isOpened: boolean;
@@ -277,7 +280,7 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
277
280
  private _inputChangeSubject$;
278
281
  private _destroy$;
279
282
  private _options;
280
- constructor(_control: NgControl, _labelByValue: LabelByValuePipe);
283
+ constructor(_control: NgControl, document: Document, cdRef: ChangeDetectorRef, _labelByValue: LabelByValuePipe);
281
284
  ngOnInit(): void;
282
285
  ngOnChanges(changes: SimpleChanges): void;
283
286
  ngAfterViewInit(): void;
@@ -295,7 +298,8 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
295
298
  setDisabledState(disabled: boolean): void;
296
299
  onBlur(): void;
297
300
  onFocus(): void;
298
- onBeforeOptionsHidden(): void;
301
+ isActive(): boolean;
302
+ onBeforeOptionsHidden(reason: CpsMenuHideReason): void;
299
303
  onBoxClick(): void;
300
304
  onContainerKeyDown(event: any): void;
301
305
  onInputKeyDown(event: any): void;
@@ -318,6 +322,6 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
318
322
  private _navigateOptionsByArrows;
319
323
  private _confirmInput;
320
324
  private _removeLastValue;
321
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsAutocompleteComponent, [{ optional: true; self: true; }, null]>;
325
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsAutocompleteComponent, [{ optional: true; self: true; }, null, null, null]>;
322
326
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsAutocompleteComponent, "cps-autocomplete", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "returnObject": { "alias": "returnObject"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "showChevron": { "alias": "showChevron"; "required": false; }; "withOptionsAliases": { "alias": "withOptionsAliases"; "required": false; }; "useOptionsAliasesWhenNoMatch": { "alias": "useOptionsAliasesWhenNoMatch"; "required": false; }; "optionAlias": { "alias": "optionAlias"; "required": false; }; "chips": { "alias": "chips"; "required": false; }; "closableChips": { "alias": "closableChips"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "openOnClear": { "alias": "openOnClear"; "required": false; }; "keepInitialOrder": { "alias": "keepInitialOrder"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionInfo": { "alias": "optionInfo"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "prefixIconSize": { "alias": "prefixIconSize"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingMessage": { "alias": "loadingMessage"; "required": false; }; "showLoadingMessage": { "alias": "showLoadingMessage"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "showEmptyMessage": { "alias": "showEmptyMessage"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "numToleratedItems": { "alias": "numToleratedItems"; "required": false; }; "externalError": { "alias": "externalError"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "emptyOptionIndex": { "alias": "emptyOptionIndex"; "required": false; }; "inputChangeDebounceTime": { "alias": "inputChangeDebounceTime"; "required": false; }; "_value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "valueChanged": "valueChanged"; "inputChanged": "inputChanged"; "focused": "focused"; "blurred": "blurred"; }, never, never, true, never>;
323
327
  }
@@ -6,6 +6,7 @@ import * as i0 from "@angular/core";
6
6
  * @group Components
7
7
  */
8
8
  export declare class CpsButtonComponent implements OnChanges {
9
+ private document;
9
10
  /**
10
11
  * Color of the button.
11
12
  * @group Props
@@ -79,6 +80,7 @@ export declare class CpsButtonComponent implements OnChanges {
79
80
  cvtFontSize: string;
80
81
  cvtIconSize: string;
81
82
  classesList: string[];
83
+ constructor(document: Document);
82
84
  ngOnChanges(): void;
83
85
  setClasses(): void;
84
86
  onClick(event: Event): void;
@@ -19,6 +19,7 @@ export type CpsButtonToggleOption = {
19
19
  */
20
20
  export declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit {
21
21
  private _control;
22
+ private document;
22
23
  private renderer;
23
24
  /**
24
25
  * Label of the toggle buttons.
@@ -94,7 +95,7 @@ export declare class CpsButtonToggleComponent implements ControlValueAccessor, O
94
95
  */
95
96
  valueChanged: EventEmitter<any>;
96
97
  largestButtonWidth: number;
97
- constructor(_control: NgControl, renderer: Renderer2);
98
+ constructor(_control: NgControl, document: Document, renderer: Renderer2);
98
99
  ngOnInit(): void;
99
100
  onChange: (event: any) => void;
100
101
  onTouched: () => void;
@@ -105,6 +106,6 @@ export declare class CpsButtonToggleComponent implements ControlValueAccessor, O
105
106
  private _updateValue;
106
107
  private _setEqualWidths;
107
108
  setDisabledState(disabled: boolean): void;
108
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null]>;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null, null]>;
109
110
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsButtonToggleComponent, "cps-button-toggle", never, { "label": { "alias": "label"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "mandatory": { "alias": "mandatory"; "required": false; }; "equalWidths": { "alias": "equalWidths"; "required": false; }; "optionTooltipPosition": { "alias": "optionTooltipPosition"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "_value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
110
111
  }
@@ -9,6 +9,7 @@ import * as i0 from "@angular/core";
9
9
  */
10
10
  export declare class CpsCheckboxComponent implements OnInit, ControlValueAccessor {
11
11
  private _control;
12
+ private document;
12
13
  private _elementRef;
13
14
  /**
14
15
  * Label of the checkbox.
@@ -69,7 +70,7 @@ export declare class CpsCheckboxComponent implements OnInit, ControlValueAccesso
69
70
  */
70
71
  valueChanged: EventEmitter<boolean>;
71
72
  private _value;
72
- constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>);
73
+ constructor(_control: NgControl, document: Document, _elementRef: ElementRef<HTMLElement>);
73
74
  ngOnInit(): void;
74
75
  onChange: (event: any) => void;
75
76
  onTouched: () => void;
@@ -80,6 +81,6 @@ export declare class CpsCheckboxComponent implements OnInit, ControlValueAccesso
80
81
  private _updateValue;
81
82
  setDisabledState(disabled: boolean): void;
82
83
  focus(): void;
83
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsCheckboxComponent, [{ optional: true; self: true; }, null]>;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsCheckboxComponent, [{ optional: true; self: true; }, null, null]>;
84
85
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsCheckboxComponent, "cps-checkbox", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
85
86
  }
@@ -1,9 +1,15 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * CpsDividerType is used to define the type of the divider.
4
+ * @group Types
5
+ */
6
+ export type CpsDividerType = 'solid' | 'dashed' | 'dotted';
2
7
  /**
3
8
  * CpsDividerComponent is a component that can be used to separate content.
4
9
  * @group Components
5
10
  */
6
11
  export declare class CpsDividerComponent {
12
+ private document;
7
13
  /**
8
14
  * Determines whether the divider is vertically aligned.
9
15
  * @group Props
@@ -14,13 +20,20 @@ export declare class CpsDividerComponent {
14
20
  * @group Props
15
21
  */
16
22
  color: import("@angular/core").InputSignal<string>;
23
+ /**
24
+ * Type of the divider.
25
+ * @group Props
26
+ */
27
+ type: import("@angular/core").InputSignal<CpsDividerType>;
17
28
  /**
18
29
  * Thickness of the divider, a number denoting pixels or a string.
19
30
  * @group Props
20
31
  */
21
32
  thickness: import("@angular/core").InputSignal<string | number>;
22
- private _dividerColor;
23
- private _dividerThickness;
33
+ constructor(document: Document);
34
+ private _borderTop;
35
+ private _borderRight;
36
+ private _constructBorder;
24
37
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsDividerComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsDividerComponent, "cps-divider", never, { "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsDividerComponent, "cps-divider", never, { "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
39
  }
@@ -8,6 +8,7 @@ import * as i0 from "@angular/core";
8
8
  */
9
9
  export declare class CpsExpansionPanelComponent implements OnInit, AfterViewInit {
10
10
  private _animationBuilder;
11
+ private document;
11
12
  private _renderer;
12
13
  /**
13
14
  * Title of the expansionPanel element.
@@ -75,7 +76,7 @@ export declare class CpsExpansionPanelComponent implements OnInit, AfterViewInit
75
76
  private _contentExpandAnimation;
76
77
  private _contentCollapseAnimation;
77
78
  private _contentAnimationPlayer;
78
- constructor(_animationBuilder: AnimationBuilder, _renderer: Renderer2);
79
+ constructor(_animationBuilder: AnimationBuilder, document: Document, _renderer: Renderer2);
79
80
  ngOnInit(): void;
80
81
  ngAfterViewInit(): void;
81
82
  toggleExpansion(): void;
@@ -16,6 +16,7 @@ export type iconSizeType = number | string | 'fill' | 'xsmall' | 'small' | 'norm
16
16
  * @group Components
17
17
  */
18
18
  export declare class CpsIconComponent implements OnChanges {
19
+ private document;
19
20
  /**
20
21
  * Name of the icon.
21
22
  * @group Props
@@ -35,6 +36,7 @@ export declare class CpsIconComponent implements OnChanges {
35
36
  url: string;
36
37
  cvtSize: string;
37
38
  classesList: string[];
39
+ constructor(document: Document);
38
40
  ngOnChanges(): void;
39
41
  setClasses(): void;
40
42
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsIconComponent, never>;
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
5
5
  * @group Components
6
6
  */
7
7
  export declare class CpsLoaderComponent implements OnInit {
8
+ private document;
8
9
  /**
9
10
  * Option for loader component to take up the whole screen.
10
11
  * @group Props
@@ -26,6 +27,7 @@ export declare class CpsLoaderComponent implements OnInit {
26
27
  */
27
28
  showLabel: boolean;
28
29
  backgroundColor: string;
30
+ constructor(document: Document);
29
31
  ngOnInit(): void;
30
32
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsLoaderComponent, never>;
31
33
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsLoaderComponent, "cps-loader", never, { "fullScreen": { "alias": "fullScreen"; "required": false; }; "opacity": { "alias": "opacity"; "required": false; }; "labelColor": { "alias": "labelColor"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; }, {}, never, never, true, never>;
@@ -20,6 +20,20 @@ export type CpsMenuItem = {
20
20
  disabled?: boolean;
21
21
  loading?: boolean;
22
22
  };
23
+ /**
24
+ * An enumeration of the different reasons for hiding the menu.
25
+ * @group Enums
26
+ */
27
+ export declare enum CpsMenuHideReason {
28
+ FORCED = "forced",
29
+ TOGGLE = "toggle",
30
+ CLICK_ITEM = "click-item",
31
+ CLICK_OUTSIDE = "click-outside",
32
+ KEYDOWN_ESCAPE = "keydown-escape",
33
+ SCROLL = "scroll",
34
+ RESIZE = "resize",
35
+ TARGET_NOT_CONNECTED = "target-not-connected"
36
+ }
23
37
  /**
24
38
  * CpsMenuAttachPosition is used to define attachment position of the CpsMenuComponent.
25
39
  * @group Types
@@ -90,14 +104,16 @@ export declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnCha
90
104
  menuShown: EventEmitter<any>;
91
105
  /**
92
106
  * Callback to invoke when menu is hidden.
107
+ * @param {CpsMenuHideReason} CpsMenuHideReason - reason for hiding the menu.
93
108
  * @group Emits
94
109
  */
95
- menuHidden: EventEmitter<any>;
110
+ menuHidden: EventEmitter<CpsMenuHideReason>;
96
111
  /**
97
112
  * Callback to invoke before menu is hidden.
113
+ * @param {CpsMenuHideReason} CpsMenuHideReason - reason for hiding the menu.
98
114
  * @group Emits
99
115
  */
100
- beforeMenuHidden: EventEmitter<any>;
116
+ beforeMenuHidden: EventEmitter<CpsMenuHideReason>;
101
117
  /**
102
118
  * Callback to invoke when content is clicked.
103
119
  * @group Emits
@@ -123,13 +139,15 @@ export declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnCha
123
139
  overlaySubscription: Subscription | undefined;
124
140
  resizeObserver: ResizeObserver;
125
141
  itemsClasses: string[];
142
+ hideReason: CpsMenuHideReason | undefined;
143
+ private window;
126
144
  constructor(document: Document, platformId: any, el: ElementRef, renderer: Renderer2, cd: ChangeDetectorRef, zone: NgZone, config: PrimeNGConfig, overlayService: OverlayService);
127
145
  ngOnChanges(changes: SimpleChanges): void;
128
146
  ngAfterViewInit(): void;
129
147
  private _setItemsClasses;
130
148
  toggle(event?: any, target?: any, pos?: CpsMenuAttachPosition): void;
131
149
  show(event?: any, target?: any, pos?: CpsMenuAttachPosition): void;
132
- hide(): void;
150
+ hide(reason?: CpsMenuHideReason): void;
133
151
  isVisible(): boolean;
134
152
  onItemClick(event: any, item: CpsMenuItem): void;
135
153
  bindDocumentKeydownListener(): void;
@@ -6,6 +6,7 @@ import * as i0 from "@angular/core";
6
6
  * @group Components
7
7
  */
8
8
  export declare class CpsPaginatorComponent implements OnInit {
9
+ private document;
9
10
  /**
10
11
  * Zero-relative number of the first row to be displayed.
11
12
  * @group Props
@@ -52,6 +53,7 @@ export declare class CpsPaginatorComponent implements OnInit {
52
53
  label: string;
53
54
  value: number;
54
55
  }[];
56
+ constructor(document: Document);
55
57
  ngOnInit(): void;
56
58
  onPageChange(event: any): void;
57
59
  onRowsPerPageChange(rows: number): void;
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
5
5
  * @group Components
6
6
  */
7
7
  export declare class CpsProgressCircularComponent implements OnInit {
8
+ private document;
8
9
  /**
9
10
  * Diameter of the progress bar, of type number denoting pixels or string.
10
11
  * @group Props
@@ -20,6 +21,7 @@ export declare class CpsProgressCircularComponent implements OnInit {
20
21
  * @group Props
21
22
  */
22
23
  color: string;
24
+ constructor(document: Document);
23
25
  ngOnInit(): void;
24
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsProgressCircularComponent, never>;
25
27
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsProgressCircularComponent, "cps-progress-circular", never, { "diameter": { "alias": "diameter"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
5
5
  * @group Components
6
6
  */
7
7
  export declare class CpsProgressLinearComponent implements OnInit {
8
+ private document;
8
9
  /**
9
10
  * Width of the progress bar, of type number denoting pixels or string.
10
11
  * @group Props
@@ -35,6 +36,7 @@ export declare class CpsProgressLinearComponent implements OnInit {
35
36
  * @group Props
36
37
  */
37
38
  radius: number | string;
39
+ constructor(document: Document);
38
40
  ngOnInit(): void;
39
41
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsProgressLinearComponent, never>;
40
42
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsProgressLinearComponent, "cps-progress-linear", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "color": { "alias": "color"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "opacity": { "alias": "opacity"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; }, {}, never, never, true, never>;
@@ -32,6 +32,7 @@ export type CpsTabsAlignmentType = 'left' | 'center' | 'right';
32
32
  */
33
33
  export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterViewInit, OnChanges, OnDestroy {
34
34
  private cdRef;
35
+ private document;
35
36
  /**
36
37
  * Index of the selected tab.
37
38
  * @default 0
@@ -102,7 +103,7 @@ export declare class CpsTabGroupComponent implements OnInit, AfterContentInit, A
102
103
  listScroll$: Subscription;
103
104
  private _currentTabIndex;
104
105
  private _previousTabIndex;
105
- constructor(cdRef: ChangeDetectorRef);
106
+ constructor(cdRef: ChangeDetectorRef, document: Document);
106
107
  ngOnInit(): void;
107
108
  ngOnChanges(changes: SimpleChanges): void;
108
109
  ngAfterContentInit(): void;
@@ -32,6 +32,7 @@ export type CpsTableSortMode = 'single' | 'multiple';
32
32
  */
33
33
  export declare class CpsTableComponent implements OnInit, AfterViewChecked, OnChanges {
34
34
  private cdRef;
35
+ private document;
35
36
  /**
36
37
  * An array of objects to represent dynamic columns.
37
38
  * @group Props
@@ -476,7 +477,7 @@ export declare class CpsTableComponent implements OnInit, AfterViewChecked, OnCh
476
477
  [key: string]: any;
477
478
  }[];
478
479
  exportMenuItems: CpsMenuItem[];
479
- constructor(cdRef: ChangeDetectorRef);
480
+ constructor(cdRef: ChangeDetectorRef, document: Document);
480
481
  ngOnInit(): void;
481
482
  get styleClass(): string;
482
483
  ngAfterViewChecked(): void;
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export declare class CpsTagComponent implements ControlValueAccessor, OnChanges {
9
9
  private _control;
10
+ private document;
10
11
  /**
11
12
  * Label of the tag.
12
13
  * @group Props
@@ -42,7 +43,7 @@ export declare class CpsTagComponent implements ControlValueAccessor, OnChanges
42
43
  valueChanged: EventEmitter<boolean>;
43
44
  classesList: string[];
44
45
  private _value;
45
- constructor(_control: NgControl);
46
+ constructor(_control: NgControl, document: Document);
46
47
  ngOnChanges(): void;
47
48
  setClasses(): void;
48
49
  onChange: (event: any) => void;
@@ -52,6 +53,6 @@ export declare class CpsTagComponent implements ControlValueAccessor, OnChanges
52
53
  writeValue(value: boolean): void;
53
54
  toggleSelected(): void;
54
55
  private _updateValue;
55
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsTagComponent, [{ optional: true; self: true; }]>;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsTagComponent, [{ optional: true; self: true; }, null]>;
56
57
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsTagComponent, "cps-tag", never, { "label": { "alias": "label"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
57
58
  }
@@ -1,6 +1,7 @@
1
- import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { NgControl } from '@angular/forms';
3
3
  import { TreeNode } from 'primeng/api';
4
+ import { CpsMenuHideReason } from '../cps-menu/cps-menu.component';
4
5
  import { CpsBaseTreeDropdownComponent } from '../internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
@@ -14,6 +15,7 @@ export type CpsTreeAutocompleteAppearanceType = 'outlined' | 'underlined' | 'bor
14
15
  */
15
16
  export declare class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownComponent implements OnInit, AfterViewInit, OnDestroy {
16
17
  control: NgControl;
18
+ private document;
17
19
  cdRef: ChangeDetectorRef;
18
20
  /**
19
21
  * Message if array of items is empty.
@@ -30,19 +32,22 @@ export declare class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownCom
30
32
  * @group Props
31
33
  */
32
34
  placeholder: string;
35
+ treeAutocompleteInput: ElementRef;
33
36
  inputText: string;
34
37
  backspaceClickedOnce: boolean;
35
38
  activeSingle: boolean;
36
- constructor(control: NgControl, cdRef: ChangeDetectorRef);
39
+ constructor(control: NgControl, document: Document, cdRef: ChangeDetectorRef);
37
40
  ngOnInit(): void;
38
41
  ngAfterViewInit(): void;
39
42
  ngOnDestroy(): void;
40
43
  onSelectNode(): void;
41
- onBeforeOptionsHidden(): void;
44
+ onBlur(): void;
45
+ onBeforeOptionsHidden(reason: CpsMenuHideReason): void;
42
46
  onBoxClick(): void;
43
47
  onContainerKeyDown(event: any): void;
44
48
  onInputKeyDown(event: any): void;
45
49
  onChevronClick(event: any): void;
50
+ isActive(): boolean;
46
51
  remove(option: TreeNode): void;
47
52
  clear(event?: any): void;
48
53
  focusInput(): void;
@@ -55,6 +60,6 @@ export declare class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownCom
55
60
  private _closeAndClear;
56
61
  private _confirmInput;
57
62
  private _removeLastValue;
58
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsTreeAutocompleteComponent, [{ optional: true; }, null]>;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsTreeAutocompleteComponent, [{ optional: true; }, null, null]>;
59
64
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsTreeAutocompleteComponent, "cps-tree-autocomplete", never, { "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
60
65
  }
@@ -25,6 +25,7 @@ export type CpsTreeTableSortMode = 'single' | 'multiple';
25
25
  */
26
26
  export declare class CpsTreeTableComponent implements OnInit, AfterViewInit, OnDestroy, AfterViewChecked, OnChanges {
27
27
  private cdRef;
28
+ private document;
28
29
  private renderer;
29
30
  private ngZone;
30
31
  /**
@@ -470,8 +471,9 @@ export declare class CpsTreeTableComponent implements OnInit, AfterViewInit, OnD
470
471
  private _scrollbarWidth;
471
472
  private _scrollbarVisible;
472
473
  private _needRecalcAutoLayout;
473
- _data: any[];
474
- constructor(cdRef: ChangeDetectorRef, renderer: Renderer2, ngZone: NgZone);
474
+ private _data;
475
+ private window;
476
+ constructor(cdRef: ChangeDetectorRef, document: Document, renderer: Renderer2, ngZone: NgZone);
475
477
  ngOnInit(): void;
476
478
  ngAfterViewInit(): void;
477
479
  ngAfterViewChecked(): void;
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  export declare class CpsTreetableRowTogglerDirective implements OnInit, OnDestroy {
9
9
  private elementRef;
10
+ private document;
10
11
  private viewContainerRef;
11
12
  /**
12
13
  * Cell value.
@@ -14,7 +15,7 @@ export declare class CpsTreetableRowTogglerDirective implements OnInit, OnDestro
14
15
  */
15
16
  rowNode: any;
16
17
  togglerCompRef: ComponentRef<TreeTableToggler>;
17
- constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef);
18
+ constructor(elementRef: ElementRef, document: Document, viewContainerRef: ViewContainerRef);
18
19
  ngOnInit(): void;
19
20
  ngOnDestroy(): void;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsTreetableRowTogglerDirective, never>;
@@ -16,6 +16,7 @@ export type CpsTooltipOpenOn = 'hover' | 'click' | 'focus';
16
16
  */
17
17
  export declare class CpsTooltipDirective implements OnDestroy {
18
18
  private _elementRef;
19
+ private document;
19
20
  /**
20
21
  * Tooltip text or html to show.
21
22
  * @group Props
@@ -64,7 +65,8 @@ export declare class CpsTooltipDirective implements OnDestroy {
64
65
  private _popup?;
65
66
  private _showTimeout?;
66
67
  private _hideTimeout?;
67
- constructor(_elementRef: ElementRef<HTMLElement>);
68
+ private window;
69
+ constructor(_elementRef: ElementRef<HTMLElement>, document: Document);
68
70
  ngOnDestroy(): void;
69
71
  private _createTooltip;
70
72
  private _destroyTooltip;
@@ -1,6 +1,6 @@
1
- export declare const getCpsColors: () => [
1
+ export declare const getCpsColors: (_document: Document) => [
2
2
  string,
3
3
  string
4
4
  ][];
5
- export declare const getCSSColor: (val: string) => string;
5
+ export declare const getCSSColor: (val: string, _document: Document) => string;
6
6
  export declare const getTextColor: (backgroundColor: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "17.26.0",
3
+ "version": "17.28.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",