cats-ui-lib 2.0.7 → 2.0.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/assets/images/error-info.svg +10 -0
- package/fesm2022/cats-ui-lib.mjs +370 -125
- package/fesm2022/cats-ui-lib.mjs.map +1 -1
- package/index.d.ts +59 -14
- package/package.json +1 -1
- package/styles/_utilities.scss +2 -0
package/index.d.ts
CHANGED
|
@@ -235,7 +235,7 @@ declare class SingleSelectComponent implements OnInit, OnChanges, ControlValueAc
|
|
|
235
235
|
onDivScroll(event: any): void;
|
|
236
236
|
get filteredOptionsValue(): any[];
|
|
237
237
|
static ɵfac: i0.ɵɵFactoryDeclaration<SingleSelectComponent, never>;
|
|
238
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SingleSelectComponent, "cats-ui-single-select", never, { "optionList": { "alias": "optionList"; "required": false; }; "singleSelectConfig": { "alias": "singleSelectConfig"; "required": false; }; "selectedOption": { "alias": "selectedOption"; "required": false; }; "parentNativeElement": { "alias": "parentNativeElement"; "required": false; }; }, { "onSelection": "onSelection"; "onScroll": "onScroll"; }, ["selectedData"], never, true, never>;
|
|
238
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleSelectComponent, "cats-ui-single-select", never, { "optionList": { "alias": "optionList"; "required": false; }; "singleSelectConfig": { "alias": "singleSelectConfig"; "required": false; }; "selectedOption": { "alias": "selectedOption"; "required": false; }; "disableControl": { "alias": "disableControl"; "required": false; }; "parentNativeElement": { "alias": "parentNativeElement"; "required": false; }; }, { "onSelection": "onSelection"; "onScroll": "onScroll"; }, ["selectedData"], never, true, never>;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
declare const MULTI_SELECT_CONTROL_VALUE_ACCESSOR: any;
|
|
@@ -315,7 +315,7 @@ declare class MultiSelectComponent implements OnChanges, OnInit, ControlValueAcc
|
|
|
315
315
|
checkUncheckAll(): void;
|
|
316
316
|
get filteredOptionsValue(): any[];
|
|
317
317
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
|
|
318
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "cats-ui-multi-select", never, { "optionList": { "alias": "optionList"; "required": false; }; "multiSelectConfig": { "alias": "multiSelectConfig"; "required": false; }; "selectedOptions": { "alias": "selectedOptions"; "required": false; }; }, { "onSelection": "onSelection"; }, never, never, true, never>;
|
|
318
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "cats-ui-multi-select", never, { "optionList": { "alias": "optionList"; "required": false; }; "multiSelectConfig": { "alias": "multiSelectConfig"; "required": false; }; "selectedOptions": { "alias": "selectedOptions"; "required": false; }; "disabledControl": { "alias": "disabledControl"; "required": false; }; }, { "onSelection": "onSelection"; }, never, never, true, never>;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
declare class SearchBoxComponent implements ControlValueAccessor {
|
|
@@ -413,7 +413,7 @@ declare class AutoCompleteSingleSelectComponent implements OnInit {
|
|
|
413
413
|
*/
|
|
414
414
|
onDivScroll(event: any): void;
|
|
415
415
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutoCompleteSingleSelectComponent, never>;
|
|
416
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteSingleSelectComponent, "cats-ui-input-single-select", never, { "autoSingleSelectConfig": { "alias": "autoSingleSelectConfig"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "optionsList": { "alias": "optionsList"; "required": false; }; "parentNativeElement": { "alias": "parentNativeElement"; "required": false; }; }, { "onItemSelection": "onItemSelection"; "onScroll": "onScroll"; }, never, never, true, never>;
|
|
416
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteSingleSelectComponent, "cats-ui-input-single-select", never, { "autoSingleSelectConfig": { "alias": "autoSingleSelectConfig"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "optionsList": { "alias": "optionsList"; "required": false; }; "parentNativeElement": { "alias": "parentNativeElement"; "required": false; }; "disableControl": { "alias": "disableControl"; "required": false; }; }, { "onItemSelection": "onItemSelection"; "onScroll": "onScroll"; }, never, never, true, never>;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
declare class OutsideClickDirective {
|
|
@@ -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
|
-
|
|
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:
|
|
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
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
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
|
-
|
|
915
|
-
|
|
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
|
-
|
|
974
|
-
|
|
993
|
+
declare class FileUploadComponent implements ControlValueAccessor {
|
|
994
|
+
placeholder: string;
|
|
995
|
+
errorMessage: string;
|
|
996
|
+
disabled: boolean;
|
|
997
|
+
multiple: boolean;
|
|
998
|
+
/** Button position: 'left' (prefix) | 'right' (suffix) */
|
|
999
|
+
buttonPosition: 'left' | 'right';
|
|
1000
|
+
value: File[];
|
|
1001
|
+
isFocused: boolean;
|
|
1002
|
+
onChange: (value: File[]) => void;
|
|
1003
|
+
onTouched: () => void;
|
|
1004
|
+
writeValue(files: File[] | null | undefined): void;
|
|
1005
|
+
registerOnChange(fn: (value: File[]) => void): void;
|
|
1006
|
+
registerOnTouched(fn: () => void): void;
|
|
1007
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1008
|
+
onFileSelect(event: Event, 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, { "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
package/styles/_utilities.scss
CHANGED
|
@@ -812,6 +812,8 @@ button.cats-btn {
|
|
|
812
812
|
margin-bottom: rem(8px);
|
|
813
813
|
color: var(--text-heading-primary);
|
|
814
814
|
&.disabled-option{
|
|
815
|
+
color: var(--text-body-muted);
|
|
816
|
+
pointer-events: none;
|
|
815
817
|
input[type="checkbox"]:checked{
|
|
816
818
|
background-color: var(--surface-background-subtle);
|
|
817
819
|
border-color: var(--border-core-default);
|