@gettrx/core-components-angular 1.0.30 → 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.
@@ -43,6 +43,8 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
43
43
  listLoading: boolean;
44
44
  /** To show skeleton view */
45
45
  loading: boolean;
46
+ /** To show a change is loading */
47
+ changeLoading: boolean;
46
48
  /** TO show loading spinner in search box / searching... text in the lists while searching */
47
49
  listLoaderVariation: GtrSelectListLoaderVariation;
48
50
  /**
@@ -55,10 +57,41 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
55
57
  * @default 28
56
58
  */
57
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>;
58
89
  /** Toggle state for select box container */
59
90
  isOpen: boolean;
60
91
  /** To set search value */
61
92
  searchValue: string;
93
+ /** To set autocomplete input value */
94
+ autocompleteInputValue: string;
62
95
  /** Store selected values */
63
96
  selectedValues: any[];
64
97
  /** Store selected values for multiple */
@@ -75,10 +108,14 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
75
108
  readonly valueChanged: EventEmitter<any>;
76
109
  /** Event for search value change */
77
110
  readonly searchChanged: EventEmitter<any>;
111
+ /** Event for autocomplete input */
112
+ readonly autocompleteInputChanged: EventEmitter<any>;
78
113
  /** Event for scrolling in list */
79
114
  readonly gtrScroll: EventEmitter<GtrSelectScroll>;
80
115
  /** Event if selectbox changed touched state */
81
116
  readonly gtrTouched: EventEmitter<any>;
117
+ /** Event to validate autocomplete when select box get closed */
118
+ readonly gtrBlur: EventEmitter<any>;
82
119
  /**
83
120
  * Contructor
84
121
  * @param _el
@@ -104,13 +141,15 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
104
141
  /**
105
142
  * NOTE: toggleSelectBox() function is declared to hide/show the dropdown list based on user latest event
106
143
  */
107
- toggleSelectBox(): void;
144
+ toggleSelectBox(open?: boolean): void;
108
145
  /** Remove options */
109
146
  removeOptions(event: Event, option: any): void;
110
147
  /**
111
148
  * HandleOptionClick function is declared to emit value changed events
112
149
  * @param option
113
150
  * @param removeOption
151
+ * @param emitValue
152
+ * @param toggleSelectBox
114
153
  */
115
154
  handleOptionClick(option: any, removeOption?: boolean, emitValue?: boolean, toggleSelectBox?: boolean): void;
116
155
  /**
@@ -133,6 +172,10 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
133
172
  private getNextVisibleOption;
134
173
  private getPrevVisibleOption;
135
174
  private getFocusedOption;
175
+ /**
176
+ * Get first visible option of list
177
+ */
178
+ private getFirstVisibleOption;
136
179
  /**
137
180
  * setFocusOnOption function is declared to set focus on HTML li element.
138
181
  * @param option
@@ -154,6 +197,15 @@ export declare class GtrSelectComponent implements OnChanges, ControlValueAccess
154
197
  /** TO adjust position of option list wrapper */
155
198
  private adjustPosition;
156
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;
157
209
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrSelectComponent, never>;
158
- 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; }; "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>;
159
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gettrx/core-components-angular",
3
- "version": "1.0.30",
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.30"
23
+ "@gettrx/core-styles": "1.0.32"
24
24
  },
25
25
  "module": "fesm2022/gettrx-core-components-angular.mjs",
26
26
  "typings": "index.d.ts",