@d4k-ui/nbx-inputs 21.0.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.
- package/README.md +14 -0
- package/fesm2022/d4k-ui-nbx-inputs.mjs +1342 -0
- package/fesm2022/d4k-ui-nbx-inputs.mjs.map +1 -0
- package/package.json +28 -0
- package/types/d4k-ui-nbx-inputs.d.ts +382 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy, Signal, AfterContentInit, DestroyRef, OnInit, OnChanges, AfterViewInit, ElementRef, SimpleChanges, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { ValidationErrors, AbstractControl, FormControl, ControlValueAccessor, FormGroup } from '@angular/forms';
|
|
4
|
+
import { NbComponentStatus, NbComponentSize } from '@d4k-ui/theme';
|
|
5
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
type nbxClipboardCopyType = 'json' | 'string';
|
|
9
|
+
declare class NbxClipboardDirective implements OnDestroy {
|
|
10
|
+
private clipboard;
|
|
11
|
+
private overlay;
|
|
12
|
+
private elementRef;
|
|
13
|
+
readonly value: _angular_core.InputSignal<unknown>;
|
|
14
|
+
readonly nbxClipboardCopyType: _angular_core.InputSignal<nbxClipboardCopyType>;
|
|
15
|
+
onClick(): boolean;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
private showAnimation;
|
|
18
|
+
private overlayRef;
|
|
19
|
+
private copyToClipboard;
|
|
20
|
+
private showPopover;
|
|
21
|
+
private show;
|
|
22
|
+
private hide;
|
|
23
|
+
protected getOverlayConfig(): OverlayConfig;
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxClipboardDirective, never>;
|
|
25
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NbxClipboardDirective, "[nbxClipboard]", never, { "value": { "alias": "nbxClipboard"; "required": false; "isSignal": true; }; "nbxClipboardCopyType": { "alias": "nbxClipboardCopyType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type NbxInputLabelPositionType = 'inline' | 'block' | 'inline-reverse' | 'block-center' | 'float' | 'none';
|
|
29
|
+
interface NbxLabelInfoType {
|
|
30
|
+
type: 'icon' | 'text';
|
|
31
|
+
text: string;
|
|
32
|
+
status?: NbComponentStatus;
|
|
33
|
+
}
|
|
34
|
+
type NbxInputValidationMessages = Record<string, NbxNbxValidatorsErrorsMessageValue>;
|
|
35
|
+
type NbxNbxValidatorsErrorsMessageValue = string | {
|
|
36
|
+
dataKey: string;
|
|
37
|
+
messageFunction: (arg: string) => string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @T type of value
|
|
41
|
+
* @C type of data in property customData
|
|
42
|
+
*/
|
|
43
|
+
interface NbxSelectOption<T = any, C = any> {
|
|
44
|
+
title: string;
|
|
45
|
+
value: T;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
customData?: C;
|
|
48
|
+
}
|
|
49
|
+
interface INbxControlContext {
|
|
50
|
+
value: Signal<unknown>;
|
|
51
|
+
hasRequiredValidator: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @description display error state, in general dirty and invalid.
|
|
54
|
+
* set only if you not use NG_VALUE_ACCESSOR on your parent component
|
|
55
|
+
*/
|
|
56
|
+
errorDisplayedState: Signal<boolean>;
|
|
57
|
+
errors: Signal<ValidationErrors | null>;
|
|
58
|
+
disabled: Signal<boolean>;
|
|
59
|
+
labelInfo: Signal<NbxLabelInfoType | undefined>;
|
|
60
|
+
withCopyButton: Signal<nbxClipboardCopyType | false>;
|
|
61
|
+
labelPosition: Signal<NbxInputLabelPositionType | undefined>;
|
|
62
|
+
customErrorsMessages: Signal<NbxInputValidationMessages>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class NbxControlValueAccessorBaseDirective<T, L extends NbxInputLabelPositionType = NbxInputLabelPositionType, C extends AbstractControl = FormControl<T>> implements ControlValueAccessor, AfterContentInit {
|
|
66
|
+
private readonly elementRef;
|
|
67
|
+
private readonly injector;
|
|
68
|
+
readonly destroyRef: DestroyRef;
|
|
69
|
+
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
70
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
71
|
+
readonly labelInfo: _angular_core.InputSignal<NbxLabelInfoType | undefined>;
|
|
72
|
+
readonly status: _angular_core.InputSignal<NbComponentStatus>;
|
|
73
|
+
readonly withCopyButton: _angular_core.InputSignalWithTransform<false | nbxClipboardCopyType, boolean | "" | nbxClipboardCopyType | undefined>;
|
|
74
|
+
readonly size: _angular_core.InputSignal<NbComponentSize>;
|
|
75
|
+
readonly customErrorsMessages: _angular_core.InputSignal<NbxInputValidationMessages>;
|
|
76
|
+
readonly labelPosition: _angular_core.InputSignal<L | undefined>;
|
|
77
|
+
protected styleVars: {};
|
|
78
|
+
readonly value: _angular_core.WritableSignal<T>;
|
|
79
|
+
readonly touched: _angular_core.WritableSignal<boolean>;
|
|
80
|
+
readonly disabled: _angular_core.WritableSignal<boolean>;
|
|
81
|
+
readonly dirty: _angular_core.WritableSignal<boolean>;
|
|
82
|
+
readonly invalid: _angular_core.WritableSignal<boolean>;
|
|
83
|
+
readonly errors: _angular_core.WritableSignal<ValidationErrors | null>;
|
|
84
|
+
private readonly initId;
|
|
85
|
+
private withoutControl;
|
|
86
|
+
control: C;
|
|
87
|
+
readonly errorDisplayedState: _angular_core.Signal<boolean>;
|
|
88
|
+
getContext(): INbxControlContext;
|
|
89
|
+
constructor();
|
|
90
|
+
ngAfterContentInit(): void;
|
|
91
|
+
writeValue(value: T): void;
|
|
92
|
+
protected getInputId(prefix: string): string;
|
|
93
|
+
valueChanged(value: T): void;
|
|
94
|
+
onChange(value: T): T;
|
|
95
|
+
onTouched(): void;
|
|
96
|
+
registerOnChange(fn: any): void;
|
|
97
|
+
registerOnTouched(fn: any): void;
|
|
98
|
+
setDisabledState(isDisabled: boolean): void;
|
|
99
|
+
get hasRequiredValidator(): boolean;
|
|
100
|
+
private getStylesString;
|
|
101
|
+
private subscribeToStateChange;
|
|
102
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxControlValueAccessorBaseDirective<any, any, any>, never>;
|
|
103
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NbxControlValueAccessorBaseDirective<any, any, any>, never, never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "labelInfo": { "alias": "labelInfo"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "withCopyButton": { "alias": "withCopyButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "customErrorsMessages": { "alias": "customErrorsMessages"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class NbxCustomTooltipComponent {
|
|
107
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
108
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxCustomTooltipComponent, never>;
|
|
109
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxCustomTooltipComponent, "nbx-custom-tooltip", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare class IntOrFloatDirective {
|
|
113
|
+
readonly nbxIntOrFloat: _angular_core.InputSignal<"float" | "int">;
|
|
114
|
+
private readonly elRef;
|
|
115
|
+
onKeyPress(event: KeyboardEvent): void;
|
|
116
|
+
constructor();
|
|
117
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IntOrFloatDirective, never>;
|
|
118
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IntOrFloatDirective, "[nbxIntOrFloat]", never, { "nbxIntOrFloat": { "alias": "nbxIntOrFloat"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare class NbxInputAutocompleteComponent extends NbxControlValueAccessorBaseDirective<string> implements OnInit, OnChanges, AfterViewInit {
|
|
122
|
+
protected readonly clientWidth: _angular_core.WritableSignal<string | number>;
|
|
123
|
+
readonly optionsListContainer: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
124
|
+
readonly inputElement: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
125
|
+
protected readonly searchControl: FormControl<string | null | undefined>;
|
|
126
|
+
private readonly searchValueSignal;
|
|
127
|
+
readonly optionsListClass: _angular_core.InputSignal<string>;
|
|
128
|
+
readonly options: _angular_core.InputSignal<NbxSelectOption<any, any>[]>;
|
|
129
|
+
/**
|
|
130
|
+
* you can correct height of option if you have change it style for correct work of virtual scroll
|
|
131
|
+
*/
|
|
132
|
+
readonly virtualScrollItemSizePX: _angular_core.InputSignal<number>;
|
|
133
|
+
readonly enableVirtualScroll: _angular_core.InputSignal<boolean>;
|
|
134
|
+
readonly anyStringInput: _angular_core.InputSignal<boolean>;
|
|
135
|
+
readonly selectChanged: _angular_core.OutputEmitterRef<string>;
|
|
136
|
+
protected readonly overlayVisible: _angular_core.WritableSignal<boolean>;
|
|
137
|
+
readonly filteredOptions: _angular_core.Signal<NbxSelectOption<any, any>[]>;
|
|
138
|
+
ngOnInit(): void;
|
|
139
|
+
ngOnChanges({ options }: SimpleChanges): void;
|
|
140
|
+
ngAfterViewInit(): void;
|
|
141
|
+
moveFocusToNextElement(): void;
|
|
142
|
+
switchFocusToOptions(): void;
|
|
143
|
+
private getEqualValue;
|
|
144
|
+
optionSelected(option: NbxSelectOption<string>): void;
|
|
145
|
+
protected toggleOverlay(state?: boolean): void;
|
|
146
|
+
private updateInputTitle;
|
|
147
|
+
protected setValue(value: string): void;
|
|
148
|
+
writeValue(value: string): void;
|
|
149
|
+
setDisabledState(isDisabled: boolean): void;
|
|
150
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputAutocompleteComponent, never>;
|
|
151
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputAutocompleteComponent, "nbx-input-autocomplete", never, { "optionsListClass": { "alias": "optionsListClass"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "virtualScrollItemSizePX": { "alias": "virtualScrollItemSizePX"; "required": false; "isSignal": true; }; "enableVirtualScroll": { "alias": "enableVirtualScroll"; "required": false; "isSignal": true; }; "anyStringInput": { "alias": "anyStringInput"; "required": false; "isSignal": true; }; }, { "selectChanged": "selectChanged"; }, never, ["*"], true, never>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare class NbxInputColorSelectComponent extends NbxControlValueAccessorBaseDirective<string | string[], Exclude<NbxInputLabelPositionType, 'float'>> {
|
|
155
|
+
protected readonly overlayVisible: _angular_core.WritableSignal<boolean>;
|
|
156
|
+
readonly colorSelected: _angular_core.OutputEmitterRef<string | null>;
|
|
157
|
+
/**
|
|
158
|
+
* @description if you want show select options as color you need to provide customData: string in option otherwise will be shown as regular select string
|
|
159
|
+
* @example {value: 'green', title: 'green',customData: '#000000' }
|
|
160
|
+
*/
|
|
161
|
+
readonly options: _angular_core.InputSignal<NbxSelectOption<string, string>[]>;
|
|
162
|
+
/**
|
|
163
|
+
* @description Display title in list
|
|
164
|
+
* @default true
|
|
165
|
+
*/
|
|
166
|
+
readonly withTitle: _angular_core.InputSignal<boolean>;
|
|
167
|
+
selectedOption(): NbxSelectOption<string, string> | undefined;
|
|
168
|
+
toggleOverlay(state?: boolean): void;
|
|
169
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputColorSelectComponent, never>;
|
|
170
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputColorSelectComponent, "nbx-input-color-select", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "withTitle": { "alias": "withTitle"; "required": false; "isSignal": true; }; }, { "colorSelected": "colorSelected"; }, never, ["*"], true, never>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @description for correct work you need to provide NbDatepickerModule.forRoot() in you root providers list
|
|
175
|
+
*/
|
|
176
|
+
declare class NbxInputDatePickerComponent extends NbxControlValueAccessorBaseDirective<any> {
|
|
177
|
+
readonly minDate: _angular_core.InputSignal<string | Date | null>;
|
|
178
|
+
readonly maxDate: _angular_core.InputSignal<string | Date | null>;
|
|
179
|
+
readonly dateChanged: _angular_core.OutputEmitterRef<Date>;
|
|
180
|
+
constructor();
|
|
181
|
+
dateSelected(event: any): void;
|
|
182
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputDatePickerComponent, never>;
|
|
183
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputDatePickerComponent, "nbx-input-date-picker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "dateChanged": "dateChanged"; }, never, ["*"], true, never>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface DateRangeObject {
|
|
187
|
+
start?: Date;
|
|
188
|
+
end?: Date;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* @description for correct work you need to provide NbDatepickerModule.forRoot() in you root providers list
|
|
192
|
+
*/
|
|
193
|
+
declare class NbxInputDateRangePickerComponent extends NbxControlValueAccessorBaseDirective<DateRangeObject> {
|
|
194
|
+
private dateService;
|
|
195
|
+
readonly minDate: _angular_core.InputSignal<Date | null>;
|
|
196
|
+
readonly maxDate: _angular_core.InputSignal<Date | null>;
|
|
197
|
+
readonly dateRangeChanged: _angular_core.OutputEmitterRef<DateRangeObject | null>;
|
|
198
|
+
protected inputControl: FormControl<any>;
|
|
199
|
+
constructor();
|
|
200
|
+
dateChanged(event: any): void;
|
|
201
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputDateRangePickerComponent, never>;
|
|
202
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputDateRangePickerComponent, "nbx-input-date-range-picker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "dateRangeChanged": "dateRangeChanged"; }, never, ["*"], true, never>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @description for correct work you need to provide NbDatepickerModule.forRoot() and NbTimepickerModule.forRoot() in you root providers list
|
|
207
|
+
*/
|
|
208
|
+
declare class NbxInputDateTimePickerComponent extends NbxControlValueAccessorBaseDirective<any> {
|
|
209
|
+
readonly minDate: _angular_core.InputSignal<string | Date | null>;
|
|
210
|
+
readonly maxDate: _angular_core.InputSignal<string | Date | null>;
|
|
211
|
+
readonly dateChanged: _angular_core.OutputEmitterRef<Date>;
|
|
212
|
+
constructor();
|
|
213
|
+
dateSelected(event: any): void;
|
|
214
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputDateTimePickerComponent, never>;
|
|
215
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputDateTimePickerComponent, "nbx-input-date-time-picker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "dateChanged": "dateChanged"; }, never, ["*"], true, never>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare class NbxInputMultiselectAutocompleteComponent extends NbxControlValueAccessorBaseDirective<(string | number)[]> implements AfterViewInit {
|
|
219
|
+
readonly inputElement: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
220
|
+
readonly optionsListContainer: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
221
|
+
protected readonly searchControl: FormControl<string | null>;
|
|
222
|
+
protected readonly clientWidth: _angular_core.WritableSignal<string | number>;
|
|
223
|
+
readonly optionsListClass: _angular_core.InputSignal<string>;
|
|
224
|
+
readonly selectedOnTop: _angular_core.InputSignal<boolean>;
|
|
225
|
+
/**
|
|
226
|
+
* you can correct height of option if you have change it style for correct work of virtual scroll
|
|
227
|
+
*/
|
|
228
|
+
readonly virtualScrollItemSizePX: _angular_core.InputSignal<number>;
|
|
229
|
+
readonly enableVirtualScroll: _angular_core.InputSignal<boolean>;
|
|
230
|
+
readonly options: _angular_core.InputSignal<NbxSelectOption<any, any>[]>;
|
|
231
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<(string | number)[]>;
|
|
232
|
+
private readonly searchValue;
|
|
233
|
+
protected readonly selectedValues: _angular_core.WritableSignal<(string | number)[]>;
|
|
234
|
+
protected readonly selectedTitlesString: _angular_core.Signal<string | number>;
|
|
235
|
+
protected readonly overlayVisible: _angular_core.WritableSignal<boolean>;
|
|
236
|
+
protected readonly filteredOptions: _angular_core.Signal<NbxSelectOption<any, any>[]>;
|
|
237
|
+
ngAfterViewInit(): void;
|
|
238
|
+
writeValue(value: (string | number)[] | null): void;
|
|
239
|
+
optionClicked(value: string | number): void;
|
|
240
|
+
moveFocusToNextElement(): void;
|
|
241
|
+
switchFocusToOptions(): void;
|
|
242
|
+
resetSelection(): void;
|
|
243
|
+
selectAllOptions(): void;
|
|
244
|
+
setDisabledState(isDisabled: boolean): void;
|
|
245
|
+
private setSelected;
|
|
246
|
+
protected toggleOverlay(state?: boolean): void;
|
|
247
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputMultiselectAutocompleteComponent, never>;
|
|
248
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputMultiselectAutocompleteComponent, "nbx-input-multiselect-autocomplete", never, { "optionsListClass": { "alias": "optionsListClass"; "required": false; "isSignal": true; }; "selectedOnTop": { "alias": "selectedOnTop"; "required": false; "isSignal": true; }; "virtualScrollItemSizePX": { "alias": "virtualScrollItemSizePX"; "required": false; "isSignal": true; }; "enableVirtualScroll": { "alias": "enableVirtualScroll"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; }, { "selectedChange": "selectedChange"; }, never, ["*"], true, never>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
declare class NbxInputNumberComponent extends NbxControlValueAccessorBaseDirective<string | number> {
|
|
252
|
+
readonly min: _angular_core.InputSignal<number | null>;
|
|
253
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
254
|
+
readonly onlyInt: _angular_core.InputSignal<boolean>;
|
|
255
|
+
readonly inputKeyup: _angular_core.OutputEmitterRef<string>;
|
|
256
|
+
inputKeyUp(target: HTMLInputElement): void;
|
|
257
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputNumberComponent, never>;
|
|
258
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputNumberComponent, "nbx-input-number", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "onlyInt": { "alias": "onlyInt"; "required": false; "isSignal": true; }; }, { "inputKeyup": "inputKeyup"; }, never, ["*"], true, never>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
declare class NbxInputSelectComponent extends NbxControlValueAccessorBaseDirective<string | string[]> {
|
|
262
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
263
|
+
readonly optionsListClass: _angular_core.InputSignal<string>;
|
|
264
|
+
readonly options: _angular_core.InputSignal<NbxSelectOption<any, any>[]>;
|
|
265
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<string | string[]>;
|
|
266
|
+
readonly isAllSelected: _angular_core.Signal<boolean>;
|
|
267
|
+
constructor();
|
|
268
|
+
selectAll(): void;
|
|
269
|
+
resetForm(): void;
|
|
270
|
+
selectedChangeEvent(): void;
|
|
271
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputSelectComponent, never>;
|
|
272
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputSelectComponent, "nbx-input-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "optionsListClass": { "alias": "optionsListClass"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; }, { "selectedChange": "selectedChange"; }, never, ["*"], true, never>;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
declare class NbxInputTextComponent extends NbxControlValueAccessorBaseDirective<string | number> {
|
|
276
|
+
readonly type: _angular_core.InputSignal<"search" | "text" | "email" | "tel">;
|
|
277
|
+
readonly min: _angular_core.InputSignal<number | null>;
|
|
278
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
279
|
+
readonly inputKeyup: _angular_core.OutputEmitterRef<string>;
|
|
280
|
+
inputKeyUp(target: HTMLInputElement): void;
|
|
281
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputTextComponent, never>;
|
|
282
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputTextComponent, "nbx-input-text", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "inputKeyup": "inputKeyup"; }, never, ["*"], true, never>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare class NbxInputTextareaComponent extends NbxControlValueAccessorBaseDirective<string> {
|
|
286
|
+
readonly textareaInput: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
287
|
+
readonly inputKeyup: _angular_core.OutputEmitterRef<string>;
|
|
288
|
+
readonly rows: _angular_core.InputSignal<number | null>;
|
|
289
|
+
constructor();
|
|
290
|
+
onPaste(e: ClipboardEvent): void;
|
|
291
|
+
protected keyup(): void;
|
|
292
|
+
private get innerHTMLValue();
|
|
293
|
+
private setTextAreaValue;
|
|
294
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputTextareaComponent, never>;
|
|
295
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputTextareaComponent, "nbx-input-textarea", never, { "rows": { "alias": "rows"; "required": false; "isSignal": true; }; }, { "inputKeyup": "inputKeyup"; }, never, ["*"], true, never>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare class NbxInputWrapperComponent {
|
|
299
|
+
readonly labelContent: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
300
|
+
readonly context: _angular_core.InputSignal<INbxControlContext>;
|
|
301
|
+
/**
|
|
302
|
+
* @description set to true if the input has fieldset with button in the end
|
|
303
|
+
* need to move copy button more to the left
|
|
304
|
+
*/
|
|
305
|
+
readonly isInputHasButton: _angular_core.InputSignal<boolean>;
|
|
306
|
+
readonly inputId: _angular_core.InputSignal<string | undefined>;
|
|
307
|
+
readonly copyAsJson: _angular_core.InputSignal<boolean>;
|
|
308
|
+
/**
|
|
309
|
+
* @description It's only needed to correctly display the "float" label type.
|
|
310
|
+
* It's used for inputs like chips and similar ones that don't use input to display the value.
|
|
311
|
+
* For correct operation, you also need to set searchHasValue.
|
|
312
|
+
*/
|
|
313
|
+
readonly floatLabelOnlyBySearch: _angular_core.InputSignal<boolean>;
|
|
314
|
+
/**
|
|
315
|
+
* @description It's only needed to correctly display the "float" label type.
|
|
316
|
+
* set this input if you use different controls for search and value
|
|
317
|
+
*/
|
|
318
|
+
readonly searchHasValue: _angular_core.InputSignal<boolean>;
|
|
319
|
+
readonly isLabelHasContent: _angular_core.Signal<boolean | undefined>;
|
|
320
|
+
readonly isControlHasValue: _angular_core.Signal<number | boolean>;
|
|
321
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputWrapperComponent, never>;
|
|
322
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputWrapperComponent, "nbx-input-wrapper", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; "isInputHasButton": { "alias": "isInputHasButton"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "copyAsJson": { "alias": "copyAsJson"; "required": false; "isSignal": true; }; "floatLabelOnlyBySearch": { "alias": "floatLabelOnlyBySearch"; "required": false; "isSignal": true; }; "searchHasValue": { "alias": "searchHasValue"; "required": false; "isSignal": true; }; }, {}, never, ["[label-content]", "*"], true, never>;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
declare class NbxInputErrorsComponent {
|
|
326
|
+
/**
|
|
327
|
+
* @description you need to provide key as error key like 'required' and translateKey as value
|
|
328
|
+
*/
|
|
329
|
+
readonly customErrorsMessages: _angular_core.InputSignal<NbxInputValidationMessages>;
|
|
330
|
+
readonly errors: _angular_core.InputSignal<ValidationErrors | null | undefined>;
|
|
331
|
+
private readonly errorMessages;
|
|
332
|
+
getErrorMessage(key: string, errorValue: Record<string, string> | string): string;
|
|
333
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputErrorsComponent, never>;
|
|
334
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputErrorsComponent, "nbx-input-errors", never, { "customErrorsMessages": { "alias": "customErrorsMessages"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare class NbxInputLabelComponent {
|
|
338
|
+
readonly labelInfo: _angular_core.InputSignal<NbxLabelInfoType | undefined>;
|
|
339
|
+
readonly isRequired: _angular_core.InputSignal<boolean>;
|
|
340
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
341
|
+
readonly inputId: _angular_core.InputSignal<string | undefined>;
|
|
342
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NbxInputLabelComponent, never>;
|
|
343
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NbxInputLabelComponent, "nbx-input-label", never, { "labelInfo": { "alias": "labelInfo"; "required": false; "isSignal": true; }; "isRequired": { "alias": "isRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
declare const NbxValidatorsErrorsMessage: NbxInputValidationMessages;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
*
|
|
350
|
+
* @param formGroup
|
|
351
|
+
* @param onlyActive if true, only not disabled controls will be marked as dirty
|
|
352
|
+
*/
|
|
353
|
+
declare function markAllControlsAsDirty(abstractControl: AbstractControl): void;
|
|
354
|
+
declare function isQueryIncludesInObject(obj: Record<string, any>, query: string): boolean;
|
|
355
|
+
declare function getFilteredBySearchArray<T = unknown>(arr: object[], query: string): T[];
|
|
356
|
+
declare function filterAndSortOptionsBySearch(list: NbxSelectOption[], query: string | number): NbxSelectOption[];
|
|
357
|
+
/** Returned filtered array of options witch includes query */
|
|
358
|
+
declare function filterOptionsBySearch(list: NbxSelectOption[], query: string | number): NbxSelectOption[] | [];
|
|
359
|
+
/** Returned array of options sorted by query includes index */
|
|
360
|
+
declare function sortOptionsBySearchIndex<T extends Record<string, any>>(list: T[], query: string, keySortBy: keyof T): T[];
|
|
361
|
+
/**
|
|
362
|
+
* @returns Object { [controlKey]: control value if value not undefined } value of any control will be included if control is dirty
|
|
363
|
+
*/
|
|
364
|
+
declare function getOnlyDirtyControlsValuesRecursive<T extends object>(form: FormGroup, excludeKeys?: string[]): T;
|
|
365
|
+
declare function getRandomId(prefix?: string, suffix?: string): string;
|
|
366
|
+
declare function resizeObservable(elem: Element, throttleDelay?: number): Observable<ResizeObserverEntry>;
|
|
367
|
+
|
|
368
|
+
declare const NbxValidators: {
|
|
369
|
+
url: (control: AbstractControl) => {
|
|
370
|
+
url: string;
|
|
371
|
+
} | null;
|
|
372
|
+
email: (control: AbstractControl) => Record<string, any> | null;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* @deprecated not need to use it! All providers already provided in theme
|
|
377
|
+
* @returns null
|
|
378
|
+
*/
|
|
379
|
+
declare function provideNbxInputs(): EnvironmentProviders;
|
|
380
|
+
|
|
381
|
+
export { IntOrFloatDirective, NbxClipboardDirective, NbxControlValueAccessorBaseDirective, NbxCustomTooltipComponent, NbxInputAutocompleteComponent, NbxInputColorSelectComponent, NbxInputDatePickerComponent, NbxInputDateRangePickerComponent, NbxInputDateTimePickerComponent, NbxInputErrorsComponent, NbxInputLabelComponent, NbxInputMultiselectAutocompleteComponent, NbxInputNumberComponent, NbxInputSelectComponent, NbxInputTextComponent, NbxInputTextareaComponent, NbxInputWrapperComponent, NbxValidators, NbxValidatorsErrorsMessage, filterAndSortOptionsBySearch, filterOptionsBySearch, getFilteredBySearchArray, getOnlyDirtyControlsValuesRecursive, getRandomId, isQueryIncludesInObject, markAllControlsAsDirty, provideNbxInputs, resizeObservable, sortOptionsBySearchIndex };
|
|
382
|
+
export type { INbxControlContext, NbxInputLabelPositionType, NbxInputValidationMessages, NbxLabelInfoType, NbxNbxValidatorsErrorsMessageValue, NbxSelectOption };
|