cats-ui-lib 2.2.9 → 2.2.10
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/fesm2022/cats-ui-lib.mjs +180 -12
- package/fesm2022/cats-ui-lib.mjs.map +1 -1
- package/index.d.ts +53 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { OnChanges, EventEmitter, ElementRef, SimpleChanges, OnInit, TemplateRef, ChangeDetectorRef, OnDestroy, Renderer2, QueryList, ViewContainerRef, ApplicationRef, EnvironmentInjector } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, FormControl } from '@angular/forms';
|
|
4
4
|
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -41,10 +41,33 @@ declare class SearchConfig {
|
|
|
41
41
|
serachValue: string;
|
|
42
42
|
placeholder?: string;
|
|
43
43
|
}
|
|
44
|
+
interface InputDropdownOption {
|
|
45
|
+
id?: string | number;
|
|
46
|
+
name?: string;
|
|
47
|
+
icon?: string;
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}
|
|
50
|
+
interface InputDropdownConfig {
|
|
51
|
+
options: InputDropdownOption[];
|
|
52
|
+
selected?: InputDropdownOption | string | number;
|
|
53
|
+
idField?: string;
|
|
54
|
+
textField?: string;
|
|
55
|
+
iconField?: string;
|
|
56
|
+
disabledField?: string;
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
}
|
|
44
59
|
declare class InputConfig {
|
|
45
60
|
type: 'text' | 'email' | 'password' | 'number';
|
|
46
61
|
placeholder?: string;
|
|
47
62
|
label?: string;
|
|
63
|
+
showDropdown?: boolean;
|
|
64
|
+
dropdownPosition?: 'leading' | 'trailing';
|
|
65
|
+
dropdownOptions?: InputDropdownOption[];
|
|
66
|
+
dropdownSelected?: InputDropdownOption | string | number;
|
|
67
|
+
leadingDropdown?: InputDropdownConfig;
|
|
68
|
+
trailingDropdown?: InputDropdownConfig;
|
|
69
|
+
errorMessage?: string;
|
|
70
|
+
showErrorMessage?: boolean;
|
|
48
71
|
}
|
|
49
72
|
declare class AutoCompleteSingleSelectConfig {
|
|
50
73
|
idField: string;
|
|
@@ -108,21 +131,29 @@ interface DialogConfig {
|
|
|
108
131
|
showHeader?: boolean;
|
|
109
132
|
}
|
|
110
133
|
|
|
111
|
-
declare class InputComponent implements ControlValueAccessor, Validator {
|
|
134
|
+
declare class InputComponent implements ControlValueAccessor, Validator, OnChanges {
|
|
135
|
+
private el;
|
|
112
136
|
inputConfig: InputConfig;
|
|
137
|
+
selectedValue?: InputDropdownOption | string | number;
|
|
113
138
|
onKeyDown: EventEmitter<{
|
|
114
139
|
value: string;
|
|
115
140
|
} & KeyboardEvent>;
|
|
116
141
|
onKeyUp: EventEmitter<{
|
|
117
142
|
value: string;
|
|
118
143
|
} & KeyboardEvent>;
|
|
144
|
+
onDropdownSelection: EventEmitter<InputDropdownOption>;
|
|
119
145
|
value: string;
|
|
120
146
|
disabled: boolean;
|
|
121
147
|
touched: boolean;
|
|
122
148
|
control: FormControl<any> | null;
|
|
123
149
|
showPassword: boolean;
|
|
150
|
+
openDropdown: 'leading' | 'trailing' | null;
|
|
151
|
+
selectedLeadingOption: InputDropdownOption | null;
|
|
152
|
+
selectedTrailingOption: InputDropdownOption | null;
|
|
124
153
|
private onChange;
|
|
125
154
|
private onTouched;
|
|
155
|
+
constructor(el: ElementRef);
|
|
156
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
126
157
|
/**
|
|
127
158
|
* @description Method to when value changes
|
|
128
159
|
* @author Shiva Kant
|
|
@@ -161,8 +192,25 @@ declare class InputComponent implements ControlValueAccessor, Validator {
|
|
|
161
192
|
* @author Shiva Kant
|
|
162
193
|
*/
|
|
163
194
|
togglePassword(): void;
|
|
195
|
+
toggleDropdown(position: 'leading' | 'trailing', event: MouseEvent): void;
|
|
196
|
+
selectDropdownOption(position: 'leading' | 'trailing', option: InputDropdownOption, event: MouseEvent): void;
|
|
197
|
+
getDropdownText(option: InputDropdownOption | null, config?: InputDropdownConfig): string;
|
|
198
|
+
getDropdownIcon(option: InputDropdownOption | null, config?: InputDropdownConfig): string;
|
|
199
|
+
isDropdownSelected(position: 'leading' | 'trailing', option: InputDropdownOption): boolean;
|
|
200
|
+
isOptionDisabled(option: InputDropdownOption, config?: InputDropdownConfig): boolean;
|
|
201
|
+
closeDropdown(event: MouseEvent): void;
|
|
202
|
+
private syncDropdownSelections;
|
|
203
|
+
private resolveSelectedOption;
|
|
204
|
+
getDropdownConfig(position: 'leading' | 'trailing'): InputDropdownConfig | undefined;
|
|
205
|
+
private getIdField;
|
|
206
|
+
private getTextField;
|
|
207
|
+
private getIconField;
|
|
208
|
+
private hasDropdownConfig;
|
|
209
|
+
getOptionId(option: InputDropdownOption | null, config?: InputDropdownConfig): any;
|
|
210
|
+
private emitValueChange;
|
|
211
|
+
private getDropdownSelectedValue;
|
|
164
212
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
165
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cats-ui-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; }, { "onKeyDown": "onKeyDown"; "onKeyUp": "onKeyUp"; }, never, never, true, never>;
|
|
213
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cats-ui-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; "selectedValue": { "alias": "selectedValue"; "required": false; }; }, { "onKeyDown": "onKeyDown"; "onKeyUp": "onKeyUp"; "onDropdownSelection": "onDropdownSelection"; }, never, never, true, never>;
|
|
166
214
|
}
|
|
167
215
|
|
|
168
216
|
declare const SINGLE_SELECT_CONTROL_VALUE_ACCESSOR: any;
|
|
@@ -1136,7 +1184,7 @@ declare class DialogBoxService {
|
|
|
1136
1184
|
}
|
|
1137
1185
|
|
|
1138
1186
|
interface SidebarConfig {
|
|
1139
|
-
sidebarType?: 'sectional' | string;
|
|
1187
|
+
sidebarType?: 'sectional' | 'default' | string;
|
|
1140
1188
|
switchOrganiser?: boolean;
|
|
1141
1189
|
}
|
|
1142
1190
|
interface SidebarAttribute {
|
|
@@ -1208,4 +1256,4 @@ declare class SidebarComponent {
|
|
|
1208
1256
|
}
|
|
1209
1257
|
|
|
1210
1258
|
export { AccordionComponent, AccordionItemComponent, AutoCompleteMultiSelectComponent, AutoCompleteMultiSelectConfig, AutoCompleteSingleSelectComponent, AutoCompleteSingleSelectConfig, CatsUiService, CatsUiTooltipDirective, CheckBoxConfig, CheckBoxSubtask, CheckboxButtonComponent, CustomDatePickerComponent, DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALUE_VALIDATOR, DialogBoxComponent, DialogBoxService, FileUploadComponent, HeaderComponent, 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, SidebarComponent, SingleSelectComponent, SingleSelectConfig, TabContentComponent, TabsetComponent, TimestampFilterComponent, ToggleConfig, ToogleButtonComponent, WizardComponent, WizardService, WizardStepDirective };
|
|
1211
|
-
export type { CalenderView, DatePickerConfig, DatePickerMode, DateRange, DateTimeResult, DialogConfig, FilterType, HeaderConfig, RadioButtonConfig, SidebarAttribute, SidebarConfig, SidebarFeature, SidebarModule, TabConfig, TabItem, TimeFilterConfig, TimeFilterOption, TimeFilterOutput, TimeFilterValue };
|
|
1259
|
+
export type { CalenderView, DatePickerConfig, DatePickerMode, DateRange, DateTimeResult, DialogConfig, FilterType, HeaderConfig, InputDropdownConfig, InputDropdownOption, RadioButtonConfig, SidebarAttribute, SidebarConfig, SidebarFeature, SidebarModule, TabConfig, TabItem, TimeFilterConfig, TimeFilterOption, TimeFilterOutput, TimeFilterValue };
|