cats-ui-lib 2.2.8 → 2.2.9

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/index.d.ts CHANGED
@@ -74,6 +74,7 @@ declare class AutoCompleteMultiSelectConfig {
74
74
  declare class ToggleConfig {
75
75
  checked: boolean;
76
76
  disabled?: boolean;
77
+ type?: string;
77
78
  }
78
79
  declare class CheckBoxSubtask {
79
80
  idField: string;
@@ -86,6 +87,7 @@ declare class CheckBoxConfig {
86
87
  disabledField?: string;
87
88
  name: string;
88
89
  checked?: boolean;
90
+ type?: string;
89
91
  subtasks?: CheckBoxSubtask[];
90
92
  }
91
93
  interface RadioButtonConfig {
@@ -94,6 +96,7 @@ interface RadioButtonConfig {
94
96
  valueField?: string;
95
97
  textField?: string;
96
98
  name: string;
99
+ type?: string;
97
100
  layout?: 'horizontal' | 'vertical';
98
101
  }
99
102
  interface DialogConfig {
@@ -330,6 +333,7 @@ declare class MultiSelectComponent implements OnChanges, OnInit, ControlValueAcc
330
333
  }
331
334
 
332
335
  declare class SearchBoxComponent implements ControlValueAccessor {
336
+ searchInput?: ElementRef<HTMLInputElement>;
333
337
  searchParam: string;
334
338
  searchConfig: SearchConfig;
335
339
  onClose: EventEmitter<void>;
@@ -337,6 +341,7 @@ declare class SearchBoxComponent implements ControlValueAccessor {
337
341
  private onChange;
338
342
  onTouched: () => void;
339
343
  isDisabled: boolean;
344
+ toggleSearch: boolean;
340
345
  ngOnInit(): void;
341
346
  /**
342
347
  * @description Method to Called when input changes
@@ -352,6 +357,7 @@ declare class SearchBoxComponent implements ControlValueAccessor {
352
357
  registerOnChange(fn: (value: string) => void): void;
353
358
  registerOnTouched(fn: () => void): void;
354
359
  setDisabledState?(isDisabled: boolean): void;
360
+ showSearch(): void;
355
361
  static ɵfac: i0.ɵɵFactoryDeclaration<SearchBoxComponent, never>;
356
362
  static ɵcmp: i0.ɵɵComponentDeclaration<SearchBoxComponent, "cats-ui-search-box", never, { "searchConfig": { "alias": "searchConfig"; "required": false; }; }, { "onClose": "onClose"; "searchParamValue": "searchParamValue"; }, never, never, true, never>;
357
363
  }
@@ -907,8 +913,9 @@ interface TimeFilterValue {
907
913
  type: string;
908
914
  dates?: any;
909
915
  lastValue?: number;
910
- lastUnit?: 'seconds' | 'minutes' | 'hours' | 'days';
916
+ lastUnit?: LastUnit;
911
917
  }
918
+ type LastUnit = 'seconds' | 'minutes' | 'hours' | 'days';
912
919
  declare class TimestampFilterComponent implements OnInit {
913
920
  private cdr;
914
921
  config: TimeFilterConfig;
@@ -917,8 +924,14 @@ declare class TimestampFilterComponent implements OnInit {
917
924
  radioValue: string | null;
918
925
  previousRadioValue: string | null;
919
926
  activePicker: TimeFilterOption | null;
927
+ activePickerTrigger: HTMLElement | null;
920
928
  lastValue: number;
921
- lastUnit: 'seconds' | 'minutes' | 'hours' | 'days';
929
+ lastUnit: LastUnit;
930
+ isLastUnitDropdownOpen: boolean;
931
+ lastUnitOptions: {
932
+ label: string;
933
+ value: LastUnit;
934
+ }[];
922
935
  selectedDateLabels: Record<string, string>;
923
936
  dateControls: Record<string, FormControl>;
924
937
  get normalOptions(): TimeFilterOption[];
@@ -926,10 +939,11 @@ declare class TimestampFilterComponent implements OnInit {
926
939
  /** Returns the FormControl for the currently active picker. */
927
940
  get activePickerControl(): FormControl | null;
928
941
  constructor(cdr: ChangeDetectorRef);
942
+ closeLastUnitDropdown(): void;
929
943
  ngOnInit(): void;
930
944
  private applyPreset;
931
945
  getPickerConfig(option: TimeFilterOption): DatePickerConfig;
932
- selectOption(option: TimeFilterOption): void;
946
+ selectOption(option: TimeFilterOption, trigger?: HTMLElement): void;
933
947
  onDateApplied(event: any): void;
934
948
  /**
935
949
  * Cancel: restore radio to whatever was selected before picker opened.
@@ -937,6 +951,9 @@ declare class TimestampFilterComponent implements OnInit {
937
951
  onCancel(_event: any): void;
938
952
  emitLast(): void;
939
953
  onLastChange(): void;
954
+ toggleLastUnitDropdown(option: TimeFilterOption, trigger: HTMLElement, event: MouseEvent): void;
955
+ selectLastUnit(unit: LastUnit, event: MouseEvent): void;
956
+ getLastUnitLabel(unit: TimeFilterValue['lastUnit']): string;
940
957
  reset(): void;
941
958
  private extractStartDate;
942
959
  private extractEndDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cats-ui-lib",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18 <22",
6
6
  "@angular/common": ">=18 <22"