@gettrx/core-components-angular 1.0.31 → 1.0.32

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.
@@ -57,10 +57,41 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
57
57
  * @default 28
58
58
  */
59
59
  textLimit: number;
60
+ /**
61
+ * Mark first option ready to select
62
+ * @default false
63
+ */
64
+ autoSelect: boolean;
65
+ /**
66
+ * Change select box to autocomplete input
67
+ */
68
+ autocomplete: boolean;
69
+ /**
70
+ * To enable add button in select box
71
+ */
72
+ enableAddButton: boolean;
73
+ /**
74
+ * To change button position in option list
75
+ */
76
+ addButtonPosition: 'top' | 'bottom';
77
+ /**
78
+ * Input to change add button label
79
+ */
80
+ addButtonLabel: string;
81
+ /**
82
+ * Input property to change Search Placeholder
83
+ */
84
+ searchPlaceholder: string;
85
+ /**
86
+ * Event for add button clicked
87
+ */
88
+ addButtonClicked: EventEmitter<string>;
60
89
  /** Toggle state for select box container */
61
90
  isOpen: boolean;
62
91
  /** To set search value */
63
92
  searchValue: string;
93
+ /** To set autocomplete input value */
94
+ autocompleteInputValue: string;
64
95
  /** Store selected values */
65
96
  selectedValues: any[];
66
97
  /** Store selected values for multiple */
@@ -77,10 +108,14 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
77
108
  readonly valueChanged: EventEmitter<any>;
78
109
  /** Event for search value change */
79
110
  readonly searchChanged: EventEmitter<any>;
111
+ /** Event for autocomplete input */
112
+ readonly autocompleteInputChanged: EventEmitter<any>;
80
113
  /** Event for scrolling in list */
81
114
  readonly gtrScroll: EventEmitter<GtrSelectScroll>;
82
115
  /** Event if selectbox changed touched state */
83
116
  readonly gtrTouched: EventEmitter<any>;
117
+ /** Event to validate autocomplete when select box get closed */
118
+ readonly gtrBlur: EventEmitter<any>;
84
119
  /**
85
120
  * Contructor
86
121
  * @param _el
@@ -106,7 +141,7 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
106
141
  /**
107
142
  * NOTE: toggleSelectBox() function is declared to hide/show the dropdown list based on user latest event
108
143
  */
109
- toggleSelectBox(): void;
144
+ toggleSelectBox(open?: boolean): void;
110
145
  /** Remove options */
111
146
  removeOptions(event: Event, option: any): void;
112
147
  /**
@@ -137,6 +172,10 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
137
172
  private getNextVisibleOption;
138
173
  private getPrevVisibleOption;
139
174
  private getFocusedOption;
175
+ /**
176
+ * Get first visible option of list
177
+ */
178
+ private getFirstVisibleOption;
140
179
  /**
141
180
  * setFocusOnOption function is declared to set focus on HTML li element.
142
181
  * @param option
@@ -158,6 +197,15 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
158
197
  /** TO adjust position of option list wrapper */
159
198
  private adjustPosition;
160
199
  private getOptionValue;
200
+ /**
201
+ * Handle click of add button in dropdown list
202
+ */
203
+ handleAddButton(enterKeyPressed?: boolean): void;
204
+ /**
205
+ * Handle emitted input value for autocomplete input
206
+ * @param event
207
+ */
208
+ handleAutocompleteInput(event: Event): void;
161
209
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrSelectComponent, never>;
162
- static ɵcmp: i0.ɵɵComponentDeclaration<GtrSelectComponent, "gtr-select", never, { "inputLabel": { "alias": "inputLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatPlaceholder": { "alias": "floatPlaceholder"; "required": false; }; "labelKey": { "alias": "labelKey"; "required": false; }; "valueKey": { "alias": "valueKey"; "required": false; }; "selectedLabel": { "alias": "selectedLabel"; "required": false; }; "highlightLabel": { "alias": "highlightLabel"; "required": false; }; "subLabel": { "alias": "subLabel"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "value": { "alias": "value"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "lazyLoaded": { "alias": "lazyLoaded"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "is_invalid": { "alias": "is_invalid"; "required": false; }; "listLoading": { "alias": "listLoading"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "changeLoading": { "alias": "changeLoading"; "required": false; }; "listLoaderVariation": { "alias": "listLoaderVariation"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textLimit": { "alias": "textLimit"; "required": false; }; }, { "valueChanged": "valueChanged"; "searchChanged": "searchChanged"; "gtrScroll": "gtrScroll"; "gtrTouched": "gtrTouched"; }, never, ["[slot='custom-error']"], false, never>;
210
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrSelectComponent, "gtr-select", never, { "inputLabel": { "alias": "inputLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatPlaceholder": { "alias": "floatPlaceholder"; "required": false; }; "labelKey": { "alias": "labelKey"; "required": false; }; "valueKey": { "alias": "valueKey"; "required": false; }; "selectedLabel": { "alias": "selectedLabel"; "required": false; }; "highlightLabel": { "alias": "highlightLabel"; "required": false; }; "subLabel": { "alias": "subLabel"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "value": { "alias": "value"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "lazyLoaded": { "alias": "lazyLoaded"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "is_invalid": { "alias": "is_invalid"; "required": false; }; "listLoading": { "alias": "listLoading"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "changeLoading": { "alias": "changeLoading"; "required": false; }; "listLoaderVariation": { "alias": "listLoaderVariation"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textLimit": { "alias": "textLimit"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "enableAddButton": { "alias": "enableAddButton"; "required": false; }; "addButtonPosition": { "alias": "addButtonPosition"; "required": false; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; }, { "addButtonClicked": "addButtonClicked"; "valueChanged": "valueChanged"; "searchChanged": "searchChanged"; "autocompleteInputChanged": "autocompleteInputChanged"; "gtrScroll": "gtrScroll"; "gtrTouched": "gtrTouched"; "gtrBlur": "gtrBlur"; }, never, ["[slot='custom-error']"], false, never>;
163
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gettrx/core-components-angular",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Angular specific wrappers for @gettrx/core-components",
5
5
  "keywords": [
6
6
  "gettrx",
@@ -20,7 +20,7 @@
20
20
  "peerDependencies": {
21
21
  "@angular/common": "^16.1.0",
22
22
  "@angular/core": "^16.1.0",
23
- "@gettrx/core-styles": "1.0.31"
23
+ "@gettrx/core-styles": "1.0.32"
24
24
  },
25
25
  "module": "fesm2022/gettrx-core-components-angular.mjs",
26
26
  "typings": "index.d.ts",