cps-ui-kit 17.5.0 → 17.7.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 (23) hide show
  1. package/esm2022/lib/components/cps-autocomplete/cps-autocomplete.component.mjs +1 -3
  2. package/esm2022/lib/components/cps-datepicker/cps-datepicker.component.mjs +1 -3
  3. package/esm2022/lib/components/cps-input/cps-input.component.mjs +1 -3
  4. package/esm2022/lib/components/cps-radio-group/cps-radio/cps-radio.component.mjs +1 -1
  5. package/esm2022/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.mjs +25 -3
  6. package/esm2022/lib/components/cps-radio-group/cps-radio-group.component.mjs +71 -4
  7. package/esm2022/lib/components/cps-scheduler/cps-scheduler.component.mjs +3 -3
  8. package/esm2022/lib/components/cps-select/cps-select.component.mjs +1 -3
  9. package/esm2022/lib/components/cps-textarea/cps-textarea.component.mjs +1 -3
  10. package/esm2022/lib/components/cps-timepicker/cps-timepicker.component.mjs +11 -13
  11. package/esm2022/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.mjs +1 -3
  12. package/fesm2022/cps-ui-kit.mjs +108 -26
  13. package/fesm2022/cps-ui-kit.mjs.map +1 -1
  14. package/lib/components/cps-autocomplete/cps-autocomplete.component.d.ts +1 -1
  15. package/lib/components/cps-datepicker/cps-datepicker.component.d.ts +1 -1
  16. package/lib/components/cps-input/cps-input.component.d.ts +1 -1
  17. package/lib/components/cps-radio-group/cps-radio-button/cps-radio-button.component.d.ts +15 -1
  18. package/lib/components/cps-radio-group/cps-radio-group.component.d.ts +32 -3
  19. package/lib/components/cps-select/cps-select.component.d.ts +1 -1
  20. package/lib/components/cps-textarea/cps-textarea.component.d.ts +1 -1
  21. package/lib/components/cps-timepicker/cps-timepicker.component.d.ts +14 -14
  22. package/lib/components/internal/cps-base-tree-dropdown/cps-base-tree-dropdown.component.d.ts +1 -1
  23. package/package.json +1 -1
@@ -228,7 +228,7 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
228
228
  virtualList: VirtualScroller;
229
229
  optionsMenu: CpsMenuComponent;
230
230
  optionsList: ElementRef;
231
- private _statusChangesSubscription;
231
+ private _statusChangesSubscription?;
232
232
  error: string;
233
233
  cvtWidth: string;
234
234
  isOpened: boolean;
@@ -119,7 +119,7 @@ export declare class CpsDatepickerComponent implements ControlValueAccessor, OnI
119
119
  isOpened: boolean;
120
120
  error: string;
121
121
  cvtWidth: string;
122
- private _statusChangesSubscription;
122
+ private _statusChangesSubscription?;
123
123
  private _value;
124
124
  constructor(_control: NgControl);
125
125
  ngOnInit(): void;
@@ -173,7 +173,7 @@ export declare class CpsInputComponent implements ControlValueAccessor, OnInit,
173
173
  currentType: string;
174
174
  prefixWidth: string;
175
175
  cvtWidth: string;
176
- private _statusChangesSubscription;
176
+ private _statusChangesSubscription?;
177
177
  private _value;
178
178
  constructor(_control: NgControl, elementRef: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef);
179
179
  ngOnInit(): void;
@@ -28,8 +28,22 @@ export declare class CpsRadioButtonComponent {
28
28
  * @group Emits
29
29
  */
30
30
  updateValueEvent: EventEmitter<Event>;
31
+ /**
32
+ * Callback to invoke when the radio button loses focus.
33
+ * @param {any}
34
+ * @group Emits
35
+ */
36
+ blurred: EventEmitter<any>;
37
+ /**
38
+ * Callback to invoke when the radio button receives focus.
39
+ * @param {any}
40
+ * @group Emits
41
+ */
42
+ focused: EventEmitter<any>;
31
43
  get inputId(): string;
32
44
  updateValue(event: Event): void;
45
+ onBlur(): void;
46
+ onFocus(): void;
33
47
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsRadioButtonComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioButtonComponent, "cps-radio-button", never, { "option": { "alias": "option"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "groupDisabled": { "alias": "groupDisabled"; "required": false; }; }, { "updateValueEvent": "updateValueEvent"; }, never, ["*"], true, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioButtonComponent, "cps-radio-button", never, { "option": { "alias": "option"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "groupDisabled": { "alias": "groupDisabled"; "required": false; }; }, { "updateValueEvent": "updateValueEvent"; "blurred": "blurred"; "focused": "focused"; }, never, ["*"], true, never>;
35
49
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, InjectionToken } from '@angular/core';
1
+ import { EventEmitter, InjectionToken, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { CpsTooltipPosition } from '../../directives/cps-tooltip/cps-tooltip.directive';
4
4
  import * as i0 from "@angular/core";
@@ -13,7 +13,7 @@ export declare const CPS_RADIO_GROUP: InjectionToken<CpsRadioGroupComponent>;
13
13
  * CpsRadioGroupComponent is a radio buttons group.
14
14
  * @group Components
15
15
  */
16
- export declare class CpsRadioGroupComponent implements ControlValueAccessor {
16
+ export declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, OnDestroy {
17
17
  private _control;
18
18
  /**
19
19
  * An array of options.
@@ -60,6 +60,16 @@ export declare class CpsRadioGroupComponent implements ControlValueAccessor {
60
60
  * @group Props
61
61
  */
62
62
  infoTooltipPosition: CpsTooltipPosition;
63
+ /**
64
+ * Bottom hint text for the radio group.
65
+ * @group Props
66
+ */
67
+ hint: string;
68
+ /**
69
+ * Hides hint and validation errors.
70
+ * @group Props
71
+ */
72
+ hideDetails: boolean;
63
73
  /**
64
74
  * Value of the radio group.
65
75
  * @group Props
@@ -72,8 +82,24 @@ export declare class CpsRadioGroupComponent implements ControlValueAccessor {
72
82
  * @group Emits
73
83
  */
74
84
  valueChanged: EventEmitter<boolean>;
85
+ /**
86
+ * Callback to invoke when the radio group loses focus.
87
+ * @param {any}
88
+ * @group Emits
89
+ */
90
+ blurred: EventEmitter<any>;
91
+ /**
92
+ * Callback to invoke when the radio group receives focus.
93
+ * @param {any}
94
+ * @group Emits
95
+ */
96
+ focused: EventEmitter<any>;
97
+ private _statusChangesSubscription?;
75
98
  private _value;
99
+ error: string;
76
100
  constructor(_control: NgControl);
101
+ ngOnInit(): void;
102
+ ngOnDestroy(): void;
77
103
  onChange: (event: any) => void;
78
104
  onTouched: () => void;
79
105
  registerOnChange(fn: any): void;
@@ -82,6 +108,9 @@ export declare class CpsRadioGroupComponent implements ControlValueAccessor {
82
108
  updateValueEvent(value: any): void;
83
109
  private _updateValue;
84
110
  setDisabledState(disabled: boolean): void;
111
+ onBlur(): void;
112
+ onFocus(): void;
113
+ private _checkErrors;
85
114
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsRadioGroupComponent, [{ optional: true; self: true; }]>;
86
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioGroupComponent, "cps-radio-group", never, { "options": { "alias": "options"; "required": false; }; "groupLabel": { "alias": "groupLabel"; "required": false; }; "vertical": { "alias": "vertical"; "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; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, ["*"], true, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioGroupComponent, "cps-radio-group", never, { "options": { "alias": "options"; "required": false; }; "groupLabel": { "alias": "groupLabel"; "required": false; }; "vertical": { "alias": "vertical"; "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; }; "hint": { "alias": "hint"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "blurred": "blurred"; "focused": "focused"; }, never, ["*"], true, never>;
87
116
  }
@@ -185,7 +185,7 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
185
185
  virtualList: VirtualScroller;
186
186
  optionsMenu: CpsMenuComponent;
187
187
  optionsList: ElementRef;
188
- private _statusChangesSubscription;
188
+ private _statusChangesSubscription?;
189
189
  error: string;
190
190
  cvtWidth: string;
191
191
  isOpened: boolean;
@@ -129,7 +129,7 @@ export declare class CpsTextareaComponent implements ControlValueAccessor, OnIni
129
129
  * @group Emits
130
130
  */
131
131
  blurred: EventEmitter<any>;
132
- private _statusChangesSubscription;
132
+ private _statusChangesSubscription?;
133
133
  private _value;
134
134
  cvtWidth: string;
135
135
  constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>);
@@ -16,20 +16,6 @@ export interface CpsTime {
16
16
  */
17
17
  export declare class CpsTimepickerComponent implements OnInit, AfterViewInit, OnDestroy {
18
18
  private _control;
19
- dayPeriodOptions: CpsButtonToggleOption[];
20
- hoursOptions: {
21
- label: string;
22
- value: string;
23
- }[];
24
- minutesOptions: {
25
- value: string;
26
- label: string;
27
- }[];
28
- secondsOptions: {
29
- label: string;
30
- value: string;
31
- }[];
32
- private _statusChangesSubscription;
33
19
  /**
34
20
  * Label of the timepicker.
35
21
  * @group Props
@@ -105,6 +91,20 @@ export declare class CpsTimepickerComponent implements OnInit, AfterViewInit, On
105
91
  hoursField: CpsAutocompleteComponent;
106
92
  minutesField: CpsAutocompleteComponent;
107
93
  secondsField?: CpsAutocompleteComponent;
94
+ dayPeriodOptions: CpsButtonToggleOption[];
95
+ hoursOptions: {
96
+ label: string;
97
+ value: string;
98
+ }[];
99
+ minutesOptions: {
100
+ value: string;
101
+ label: string;
102
+ }[];
103
+ secondsOptions: {
104
+ label: string;
105
+ value: string;
106
+ }[];
107
+ private _statusChangesSubscription?;
108
108
  error: string;
109
109
  hoursError: string;
110
110
  minutesError: string;
@@ -161,7 +161,7 @@ export declare class CpsBaseTreeDropdownComponent implements ControlValueAccesso
161
161
  optionsMenu: CpsMenuComponent;
162
162
  treeList: Tree;
163
163
  boxEl: ElementRef;
164
- private _statusChangesSubscription;
164
+ private _statusChangesSubscription?;
165
165
  _options: TreeNode[];
166
166
  optionsMap: Map<string, TreeNode<any>>;
167
167
  originalOptionsMap: Map<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "17.5.0",
3
+ "version": "17.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.1.2",
6
6
  "@angular/core": "^17.1.2",