@almoamendev/ngx-md3 0.8.0 → 0.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almoamendev/ngx-md3",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "MD3-style Angular components & style library",
5
5
  "author": "Murtadha (Hussain) Almoamen",
6
6
  "license": "MIT",
@@ -1884,6 +1884,11 @@ declare class SelectField implements ControlValueAccessor {
1884
1884
  private readonly ngControl;
1885
1885
  options: _angular_core.InputSignal<SelectOption[]>;
1886
1886
  multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
1887
+ /**
1888
+ * Lets the user type in the field to filter the options. While the field has focus it
1889
+ * acts as a search box; the selected options are shown again as soon as it loses focus.
1890
+ */
1891
+ searchable: _angular_core.InputSignalWithTransform<boolean, unknown>;
1887
1892
  label: _angular_core.InputSignal<string | null>;
1888
1893
  /**
1889
1894
  * Formats the text shown in the field. The default joins the labels of the selected
@@ -1897,6 +1902,7 @@ declare class SelectField implements ControlValueAccessor {
1897
1902
  */
1898
1903
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
1899
1904
  menuColors: _angular_core.InputSignal<"standard" | "vibrant">;
1905
+ scrollStrategy: _angular_core.InputSignal<MenuScrollStrategy | undefined>;
1900
1906
  fieldType: _angular_core.InputSignal<"filled" | "outlined">;
1901
1907
  /**
1902
1908
  * Control passed explicitly, mirroring md3-text-field. Takes precedence over a form
@@ -1922,11 +1928,31 @@ declare class SelectField implements ControlValueAccessor {
1922
1928
  private onTouched;
1923
1929
  /** Selection is kept by value so it survives options arriving or being replaced later. */
1924
1930
  private selectedValues;
1931
+ private searchQuery;
1932
+ private isInputFocused;
1925
1933
  formControl: _angular_core.Signal<AbstractControl<any, any, any> | undefined>;
1926
1934
  isDisabled: _angular_core.Signal<boolean>;
1927
1935
  selectedOptions: _angular_core.Signal<SelectOption[]>;
1928
1936
  selectedText: _angular_core.Signal<string | null>;
1937
+ /** True while the field acts as a search box instead of showing the selection. */
1938
+ isSearching: _angular_core.Signal<boolean>;
1939
+ /** What the input element shows: the search query while searching, the selection otherwise. */
1940
+ displayText: _angular_core.Signal<string | null>;
1941
+ /**
1942
+ * Each option paired with the text the search runs against. It is rebuilt only when the
1943
+ * options array changes, so typing does not normalize the same text again and again.
1944
+ * The fields are joined with a character the query can never contain, which stops a query
1945
+ * from matching across two fields.
1946
+ */
1947
+ private searchIndex;
1948
+ /** The options the menu shows. Options that do not match the query are hidden. */
1949
+ filteredOptions: _angular_core.Signal<SelectOption[]>;
1929
1950
  constructor(menuService: MenuService, viewContainerRef: ViewContainerRef);
1951
+ onSearchFocus(): void;
1952
+ onSearchBlur(): void;
1953
+ onSearchInput(event: Event): void;
1954
+ /** Lower-cases the text and removes everything that is not a letter or a digit. */
1955
+ private normalizeSearchText;
1930
1956
  writeValue(value: SelectFieldValue): void;
1931
1957
  registerOnChange(fn: (value: SelectFieldValue) => void): void;
1932
1958
  registerOnTouched(fn: () => void): void;
@@ -1949,7 +1975,7 @@ declare class SelectField implements ControlValueAccessor {
1949
1975
  private normalizeValues;
1950
1976
  private valuesAreEqual;
1951
1977
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectField, never>;
1952
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectField, "md3-select-field", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "displayWith": { "alias": "display-with"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "menuColors": { "alias": "menu-colors"; "required": false; "isSignal": true; }; "fieldType": { "alias": "field-type"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; }, {}, ["iconElements"], ["[md3-icon-element=leading]", "[md3-icon-element=arrow]", "[md3-supporting-text]"], true, never>;
1978
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectField, "md3-select-field", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "displayWith": { "alias": "display-with"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "menuColors": { "alias": "menu-colors"; "required": false; "isSignal": true; }; "scrollStrategy": { "alias": "menu-scroll-strategy"; "required": false; "isSignal": true; }; "fieldType": { "alias": "field-type"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; }, {}, ["iconElements"], ["[md3-icon-element=leading]", "[md3-icon-element=arrow]", "[md3-supporting-text]"], true, never>;
1953
1979
  }
1954
1980
 
1955
1981
  /**