cats-ui-lib 2.0.7 → 2.0.8

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
@@ -888,33 +888,53 @@ interface TimeFilterOutput {
888
888
  value?: number;
889
889
  unit?: 'Hours' | 'Days';
890
890
  key?: string;
891
+ dates?: any;
891
892
  }
892
- declare class TimestampFilterComponent {
893
+ interface TimeFilterValue {
894
+ type: string;
895
+ dates?: any;
896
+ lastValue?: number;
897
+ lastUnit?: 'seconds' | 'minutes' | 'hours' | 'days';
898
+ }
899
+ declare class TimestampFilterComponent implements OnInit {
893
900
  private cdr;
894
901
  config: TimeFilterConfig;
895
902
  selectionChange: EventEmitter<TimeFilterOutput>;
896
- selectedValue: string | null;
903
+ selectedValue: TimeFilterValue | null;
904
+ radioValue: string | null;
905
+ previousRadioValue: string | null;
897
906
  activePicker: TimeFilterOption | null;
898
907
  lastValue: number;
899
908
  lastUnit: 'seconds' | 'minutes' | 'hours' | 'days';
909
+ selectedDateLabels: Record<string, string>;
910
+ dateControls: Record<string, FormControl>;
900
911
  get normalOptions(): TimeFilterOption[];
901
912
  get customOptions(): TimeFilterOption[];
913
+ /** Returns the FormControl for the currently active picker. */
914
+ get activePickerControl(): FormControl | null;
902
915
  constructor(cdr: ChangeDetectorRef);
903
916
  ngOnInit(): void;
917
+ private applyPreset;
904
918
  getPickerConfig(option: TimeFilterOption): DatePickerConfig;
905
919
  selectOption(option: TimeFilterOption): void;
906
- private startOfDay;
907
- private startOfWeek;
908
- private startOfFinancialYear;
909
- private subtractTime;
920
+ onDateApplied(event: any): void;
921
+ /**
922
+ * Cancel: restore radio to whatever was selected before picker opened.
923
+ */
924
+ onCancel(_event: any): void;
910
925
  emitLast(): void;
911
926
  onLastChange(): void;
912
927
  reset(): void;
928
+ private extractStartDate;
929
+ private extractEndDate;
930
+ private buildDateLabel;
913
931
  private emit;
914
- onDateApplied(event: any): void;
915
- onCancel(event: any): void;
932
+ private startOfDay;
933
+ private startOfWeek;
934
+ private startOfFinancialYear;
935
+ private subtractTime;
916
936
  static ɵfac: i0.ɵɵFactoryDeclaration<TimestampFilterComponent, never>;
917
- static ɵcmp: i0.ɵɵComponentDeclaration<TimestampFilterComponent, "cats-ui-timestamp-filter", never, { "config": { "alias": "config"; "required": true; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
937
+ static ɵcmp: i0.ɵɵComponentDeclaration<TimestampFilterComponent, "cats-ui-timestamp-filter", never, { "config": { "alias": "config"; "required": true; }; "selectedValue": { "alias": "selectedValue"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
918
938
  }
919
939
 
920
940
  declare class WizardService {
@@ -970,5 +990,30 @@ declare class WizardComponent {
970
990
  static ɵcmp: i0.ɵɵComponentDeclaration<WizardComponent, "cats-ui-wizard", never, { "wizardId": { "alias": "wizardId"; "required": false; }; "title": { "alias": "title"; "required": false; }; "showProgressBar": { "alias": "showProgressBar"; "required": false; }; "showStepBadge": { "alias": "showStepBadge"; "required": false; }; }, { "closed": "closed"; }, ["stepTemplates"], never, true, never>;
971
991
  }
972
992
 
973
- export { AccordionComponent, AccordionItemComponent, AutoCompleteMultiSelectComponent, AutoCompleteMultiSelectConfig, AutoCompleteSingleSelectComponent, AutoCompleteSingleSelectConfig, CatsUiService, CatsUiTooltipDirective, CheckBoxConfig, CheckBoxSubtask, CheckboxButtonComponent, CustomDatePickerComponent, DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALUE_VALIDATOR, InputComponent, InputConfig, MULTI_SELECT_CONTROL_VALUE_ACCESSOR, MULTI_SELECT_CONTROL_VALUE_VALIDATOR, MultiSelectComponent, MultiSelectConfig, OutsideClickDirective, RadioButtonComponent, SINGLE_SELECT_CONTROL_VALUE_ACCESSOR, SINGLE_SELECT_CONTROL_VALUE_VALIDATOR, SearchBoxComponent, SearchConfig, SingleSelectComponent, SingleSelectConfig, TabContentComponent, TabsetComponent, TimestampFilterComponent, ToggleConfig, ToogleButtonComponent, WizardComponent, WizardService, WizardStepDirective };
974
- export type { CalenderView, DatePickerConfig, DatePickerMode, DateRange, DateTimeResult, FilterType, RadioButtonConfig, TabConfig, TabItem, TimeFilterConfig, TimeFilterOption, TimeFilterOutput };
993
+ declare class FileUploadComponent implements ControlValueAccessor {
994
+ label: string;
995
+ placeholder: string;
996
+ errorMessage: string;
997
+ disabled: boolean;
998
+ multiple: boolean;
999
+ buttonPosition: 'left' | 'right';
1000
+ value: File[];
1001
+ isFocused: boolean;
1002
+ onChange: (value: File[]) => void;
1003
+ onTouched: () => void;
1004
+ writeValue(files: File[]): void;
1005
+ registerOnChange(fn: any): void;
1006
+ registerOnTouched(fn: any): void;
1007
+ setDisabledState(isDisabled: boolean): void;
1008
+ onFileSelect(event: any, input: HTMLInputElement): void;
1009
+ onDrop(event: DragEvent): void;
1010
+ onDragOver(event: DragEvent): void;
1011
+ removeFile(index: number, input?: HTMLInputElement): void;
1012
+ get isFilled(): boolean;
1013
+ get hasError(): boolean;
1014
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
1015
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "cats-ui-file-upload", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "buttonPosition": { "alias": "buttonPosition"; "required": false; }; }, {}, never, never, true, never>;
1016
+ }
1017
+
1018
+ export { AccordionComponent, AccordionItemComponent, AutoCompleteMultiSelectComponent, AutoCompleteMultiSelectConfig, AutoCompleteSingleSelectComponent, AutoCompleteSingleSelectConfig, CatsUiService, CatsUiTooltipDirective, CheckBoxConfig, CheckBoxSubtask, CheckboxButtonComponent, CustomDatePickerComponent, DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALUE_VALIDATOR, FileUploadComponent, InputComponent, InputConfig, MULTI_SELECT_CONTROL_VALUE_ACCESSOR, MULTI_SELECT_CONTROL_VALUE_VALIDATOR, MultiSelectComponent, MultiSelectConfig, OutsideClickDirective, RadioButtonComponent, SINGLE_SELECT_CONTROL_VALUE_ACCESSOR, SINGLE_SELECT_CONTROL_VALUE_VALIDATOR, SearchBoxComponent, SearchConfig, SingleSelectComponent, SingleSelectConfig, TabContentComponent, TabsetComponent, TimestampFilterComponent, ToggleConfig, ToogleButtonComponent, WizardComponent, WizardService, WizardStepDirective };
1019
+ export type { CalenderView, DatePickerConfig, DatePickerMode, DateRange, DateTimeResult, FilterType, RadioButtonConfig, TabConfig, TabItem, TimeFilterConfig, TimeFilterOption, TimeFilterOutput, TimeFilterValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cats-ui-lib",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18 <22",
6
6
  "@angular/common": ">=18 <22"