ng-hub-ui-forms 22.40.0 → 22.41.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-forms",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.41.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Accessible, signal-based form fields for Angular (input, textarea, slider, segmented, select, datepicker, file input with drag & drop and upload progress) with automatic error display for controls, FormGroups and FormArrays. Reactive Forms today, Signal Forms ready. Part of the ng-hub-ui family.",
|
|
6
6
|
"author": "Carlos Morcillo Fernández <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
|
|
@@ -1805,6 +1805,22 @@ declare class HubSelectComponent extends HubFieldControl {
|
|
|
1805
1805
|
* one sync away from disappearing. See {@link placeholder}.
|
|
1806
1806
|
*/
|
|
1807
1807
|
protected readonly _ngSelectConfig: NgSelectConfig;
|
|
1808
|
+
/**
|
|
1809
|
+
* The engine behind the field, kept only so the list can be worked from outside.
|
|
1810
|
+
*
|
|
1811
|
+
* A select that something else opens — a grid cell that turns into an editor, a row that turns
|
|
1812
|
+
* into a form — is created after the reader's click has already been spent, so there is no
|
|
1813
|
+
* gesture left for it to answer. Without a way in, reaching the field takes one click and
|
|
1814
|
+
* seeing the list takes another.
|
|
1815
|
+
*/
|
|
1816
|
+
private readonly _engine;
|
|
1817
|
+
/**
|
|
1818
|
+
* Honours {@link autoOpen} once, after the first render.
|
|
1819
|
+
*
|
|
1820
|
+
* Not an effect: the intent is a one-off at birth, and an effect would re-open the list every
|
|
1821
|
+
* time the flag or the items changed underneath the reader.
|
|
1822
|
+
*/
|
|
1823
|
+
private readonly _openOnArrival;
|
|
1808
1824
|
protected readonly _labelTypes: typeof HubLabelTypes;
|
|
1809
1825
|
protected readonly _selectFormats: typeof HubSelectFormats;
|
|
1810
1826
|
protected readonly _value: _angular_core.WritableSignal<any>;
|
|
@@ -1951,6 +1967,24 @@ declare class HubSelectComponent extends HubFieldControl {
|
|
|
1951
1967
|
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1952
1968
|
/** Whether the control is read-only. */
|
|
1953
1969
|
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1970
|
+
/**
|
|
1971
|
+
* Opens the list as soon as the field appears.
|
|
1972
|
+
*
|
|
1973
|
+
* For a field that something else has already opened for the reader: a spreadsheet cell that
|
|
1974
|
+
* becomes an editor, a row that becomes a form. The click that got them there has been spent by
|
|
1975
|
+
* the time the field exists, so without this reaching the field costs one click and seeing the
|
|
1976
|
+
* list costs another. A field with nothing to offer opens all the same and says so, which is
|
|
1977
|
+
* what it would do had the reader opened it by hand.
|
|
1978
|
+
*/
|
|
1979
|
+
readonly autoOpen: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1980
|
+
/**
|
|
1981
|
+
* A search term the field starts with.
|
|
1982
|
+
*
|
|
1983
|
+
* For the same case as {@link autoOpen}, one keystroke earlier: the character that opened the
|
|
1984
|
+
* field belongs in its search box, or the reader has to type it a second time. Applied once,
|
|
1985
|
+
* on arrival, and only when the field is searchable.
|
|
1986
|
+
*/
|
|
1987
|
+
readonly initialSearchTerm: _angular_core.InputSignal<string | null>;
|
|
1954
1988
|
/**
|
|
1955
1989
|
* Text shown when no items match. Left undefined so the engine falls back to the app's
|
|
1956
1990
|
* `NgSelectConfig`, which is where a translated build sets it once for every select.
|
|
@@ -2105,8 +2139,25 @@ declare class HubSelectComponent extends HubFieldControl {
|
|
|
2105
2139
|
* @param item - The item to toggle.
|
|
2106
2140
|
*/
|
|
2107
2141
|
protected toggleItem(item: any): void;
|
|
2142
|
+
/**
|
|
2143
|
+
* Opens the list.
|
|
2144
|
+
*
|
|
2145
|
+
* Refused while the field is disabled, while it is already open, and while there is nothing to
|
|
2146
|
+
* choose from, so calling it the moment the field appears is safe whatever state it is in.
|
|
2147
|
+
*/
|
|
2148
|
+
open(): void;
|
|
2149
|
+
/** Closes the list, keeping whatever was chosen. */
|
|
2150
|
+
close(): void;
|
|
2151
|
+
/** Puts the keyboard in the field without opening the list. */
|
|
2152
|
+
focus(): void;
|
|
2153
|
+
/**
|
|
2154
|
+
* Narrows the list by a term, as typing into the search box would.
|
|
2155
|
+
*
|
|
2156
|
+
* @param term - What to search for; an empty string clears the search.
|
|
2157
|
+
*/
|
|
2158
|
+
search(term: string): void;
|
|
2108
2159
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectComponent, never>;
|
|
2109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubSelectComponent, "hub-select", never, { "prepend": { "alias": "prepend"; "required": false; "isSignal": true; }; "append": { "alias": "append"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "searchFn": { "alias": "searchFn"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelType": { "alias": "labelType"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; "isSignal": true; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "addTag": { "alias": "addTag"; "required": false; "isSignal": true; }; "addTagText": { "alias": "addTagText"; "required": false; "isSignal": true; }; "minTermLength": { "alias": "minTermLength"; "required": false; "isSignal": true; }; "typeahead": { "alias": "typeahead"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "classlist": { "alias": "classlist"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "change": "change"; "onFocus": "onFocus"; "onBlur": "onBlur"; "onOpen": "onOpen"; "onClose": "onClose"; "onClear": "onClear"; "onSearch": "onSearch"; "onAdd": "onAdd"; "onRemove": "onRemove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["_hubOptionTpl", "_ngOptionTpl", "_hubOptgroupTpl", "_ngOptgroupTpl", "_hubLabelTpl", "_ngLabelTpl", "_hubMultiLabelTpl", "_ngMultiLabelTpl", "_hubHeaderTpl", "_ngHeaderTpl", "_hubFooterTpl", "_ngFooterTpl", "_hubNotFoundTpl", "_ngNotFoundTpl", "_hubTypeToSearchTpl", "_ngTypeToSearchTpl", "_hubLoadingTextTpl", "_ngLoadingTextTpl", "_hubLoadingSpinnerTpl", "_ngLoadingSpinnerTpl", "_hubTagTpl", "_ngTagTpl", "_hubClearButtonTpl", "_ngClearButtonTpl", "_legacySuffixTpl", "_prependTpl", "_genericAppendTpl"], ["*"], true, never>;
|
|
2160
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubSelectComponent, "hub-select", never, { "prepend": { "alias": "prepend"; "required": false; "isSignal": true; }; "append": { "alias": "append"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "searchFn": { "alias": "searchFn"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelType": { "alias": "labelType"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; "isSignal": true; }; "fixedPlaceholder": { "alias": "fixedPlaceholder"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "autoOpen": { "alias": "autoOpen"; "required": false; "isSignal": true; }; "initialSearchTerm": { "alias": "initialSearchTerm"; "required": false; "isSignal": true; }; "notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "addTag": { "alias": "addTag"; "required": false; "isSignal": true; }; "addTagText": { "alias": "addTagText"; "required": false; "isSignal": true; }; "minTermLength": { "alias": "minTermLength"; "required": false; "isSignal": true; }; "typeahead": { "alias": "typeahead"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "classlist": { "alias": "classlist"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "change": "change"; "onFocus": "onFocus"; "onBlur": "onBlur"; "onOpen": "onOpen"; "onClose": "onClose"; "onClear": "onClear"; "onSearch": "onSearch"; "onAdd": "onAdd"; "onRemove": "onRemove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["_hubOptionTpl", "_ngOptionTpl", "_hubOptgroupTpl", "_ngOptgroupTpl", "_hubLabelTpl", "_ngLabelTpl", "_hubMultiLabelTpl", "_ngMultiLabelTpl", "_hubHeaderTpl", "_ngHeaderTpl", "_hubFooterTpl", "_ngFooterTpl", "_hubNotFoundTpl", "_ngNotFoundTpl", "_hubTypeToSearchTpl", "_ngTypeToSearchTpl", "_hubLoadingTextTpl", "_ngLoadingTextTpl", "_hubLoadingSpinnerTpl", "_ngLoadingSpinnerTpl", "_hubTagTpl", "_ngTagTpl", "_hubClearButtonTpl", "_ngClearButtonTpl", "_legacySuffixTpl", "_prependTpl", "_genericAppendTpl"], ["*"], true, never>;
|
|
2110
2161
|
}
|
|
2111
2162
|
|
|
2112
2163
|
/** A calendar cell enriched with its selection / range / disabled / focus state. */
|
|
@@ -4004,6 +4055,25 @@ interface HubFormControlConfig {
|
|
|
4004
4055
|
ariaLabel?: string;
|
|
4005
4056
|
cssClass?: string;
|
|
4006
4057
|
options?: ReadonlyArray<HubFormControlOption>;
|
|
4058
|
+
/**
|
|
4059
|
+
* Whether a select offers a search box. Off unless asked for.
|
|
4060
|
+
*
|
|
4061
|
+
* A control built into somebody else's chrome is usually a short list in a tight space — a
|
|
4062
|
+
* table's rows-per-page, a filter — where a search box is noise. A cell of a spreadsheet is
|
|
4063
|
+
* the other case, and a long list there is the whole reason for wiring an adapter at all.
|
|
4064
|
+
*/
|
|
4065
|
+
searchable?: boolean;
|
|
4066
|
+
/** Whether it offers to clear itself. On unless the host says otherwise, as the field does. */
|
|
4067
|
+
clearable?: boolean;
|
|
4068
|
+
/**
|
|
4069
|
+
* Whether a select opens as it appears, and on what term.
|
|
4070
|
+
*
|
|
4071
|
+
* For a control that something else has already opened for the reader: a cell that becomes an
|
|
4072
|
+
* editor, a row that becomes a form. Their gesture has been spent by the time the control
|
|
4073
|
+
* exists, and the character they typed belongs in its search box.
|
|
4074
|
+
*/
|
|
4075
|
+
autoOpen?: boolean;
|
|
4076
|
+
searchTerm?: string;
|
|
4007
4077
|
onValueChange: (value: unknown) => void;
|
|
4008
4078
|
}
|
|
4009
4079
|
/** Live handle to a control created by {@link hubFormControlAdapter}. */
|