ng-hub-ui-forms 22.33.2 → 22.34.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 +55 -3
- package/fesm2022/ng-hub-ui-forms.mjs +365 -62
- package/fesm2022/ng-hub-ui-forms.mjs.map +1 -1
- package/package.json +7 -1
- package/types/ng-hub-ui-forms.d.ts +265 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-forms",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.34.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 <carlos.morcillo@me.com> (https://www.carlosmorcillo.com)",
|
|
@@ -37,8 +37,14 @@
|
|
|
37
37
|
"@angular/core": ">=21.0.0",
|
|
38
38
|
"@angular/forms": ">=21.0.0",
|
|
39
39
|
"@angular/platform-browser": ">=21.0.0",
|
|
40
|
+
"ng-hub-ui-ds": ">=22.0.0",
|
|
40
41
|
"ng-hub-ui-utils": ">=22.12.0"
|
|
41
42
|
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"ng-hub-ui-ds": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
42
48
|
"dependencies": {
|
|
43
49
|
"tslib": "^2.3.0"
|
|
44
50
|
},
|
|
@@ -1346,6 +1346,30 @@ declare class HubSegmentedComponent extends HubFieldControl {
|
|
|
1346
1346
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubSegmentedComponent, "hub-segmented", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelType": { "alias": "labelType"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["optionTpt"], never, true, never>;
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
|
+
/**
|
|
1350
|
+
* The legend of a `<hub-fieldset>` (or any grouped section), with optional required/invalid state
|
|
1351
|
+
* styling.
|
|
1352
|
+
*
|
|
1353
|
+
* Project it as a direct child of the fieldset: it is lifted into the native `<legend>` element,
|
|
1354
|
+
* which is also what `<hub-fieldset legend="…">` builds for you — so a text legend and a rich one
|
|
1355
|
+
* are the same element with the same classes. It also stands alone as a section title.
|
|
1356
|
+
*
|
|
1357
|
+
* @example
|
|
1358
|
+
* ```html
|
|
1359
|
+
* <hub-fieldset [group]="form.controls.address">
|
|
1360
|
+
* <hub-legend [required]="true" [invalid]="form.controls.address.invalid">Shipping address</hub-legend>
|
|
1361
|
+
* </hub-fieldset>
|
|
1362
|
+
* ```
|
|
1363
|
+
*/
|
|
1364
|
+
declare class HubLegendComponent {
|
|
1365
|
+
/** Whether to render the required indicator. */
|
|
1366
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1367
|
+
/** Whether to render the invalid state styling. */
|
|
1368
|
+
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1369
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubLegendComponent, never>;
|
|
1370
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubLegendComponent, "hub-legend", never, { "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1349
1373
|
/**
|
|
1350
1374
|
* Groups related fields under a `<fieldset>`/`<legend>` and **automatically displays the
|
|
1351
1375
|
* group-level (cross-field) validation errors** of the bound `FormGroup`/`FormArray`.
|
|
@@ -1362,6 +1386,21 @@ declare class HubSegmentedComponent extends HubFieldControl {
|
|
|
1362
1386
|
* parent container. Errors set on the group itself — e.g. by `hubAreEqual` — are rendered without
|
|
1363
1387
|
* any extra wiring, mirroring how the field components show control-level errors.
|
|
1364
1388
|
*
|
|
1389
|
+
* ## The legend is always a `<hub-legend>`
|
|
1390
|
+
*
|
|
1391
|
+
* `legend="…"` is shorthand: it builds one for you. When the legend needs more than a string — a
|
|
1392
|
+
* required marker, an icon, a badge — project the element yourself and it lands in the same place:
|
|
1393
|
+
*
|
|
1394
|
+
* ```html
|
|
1395
|
+
* <fieldset hubFieldset [group]="form.controls.address">
|
|
1396
|
+
* <hub-legend [required]="true">Shipping address</hub-legend>
|
|
1397
|
+
* …
|
|
1398
|
+
* </fieldset>
|
|
1399
|
+
* ```
|
|
1400
|
+
*
|
|
1401
|
+
* The older `<ng-template hubLegend>` slot still works and is deprecated; see
|
|
1402
|
+
* {@link HubLegendDirective}.
|
|
1403
|
+
*
|
|
1365
1404
|
* @example
|
|
1366
1405
|
* ```html
|
|
1367
1406
|
* <fieldset hubFieldset legend="Credentials" [group]="form.controls.credentials">
|
|
@@ -1378,14 +1417,29 @@ declare class HubFieldsetComponent extends HubGroupControl {
|
|
|
1378
1417
|
* the appearance classes land on the element that actually is the fieldset in either form.
|
|
1379
1418
|
*/
|
|
1380
1419
|
protected readonly _isElementForm: boolean;
|
|
1381
|
-
/**
|
|
1420
|
+
/**
|
|
1421
|
+
* Legend text. Rendered inside a `<hub-legend>`, so a text legend and a projected one are the
|
|
1422
|
+
* same element. Ignored when a `<hub-legend>` is projected, or a `hubLegend` template is.
|
|
1423
|
+
*/
|
|
1382
1424
|
readonly legend: _angular_core.InputSignal<string>;
|
|
1383
1425
|
/** Extra CSS classes applied to the host element. */
|
|
1384
1426
|
readonly classlist: _angular_core.InputSignal<string>;
|
|
1385
|
-
/**
|
|
1427
|
+
/**
|
|
1428
|
+
* Query for a projected `hubLegend` template.
|
|
1429
|
+
*
|
|
1430
|
+
* @deprecated Project a `<hub-legend>` element instead — the slot exists only so the legend can
|
|
1431
|
+
* carry markup, and `<hub-legend>` carries markup without an `ng-template` and without an extra
|
|
1432
|
+
* import. Removed in 23.0.0.
|
|
1433
|
+
*/
|
|
1386
1434
|
readonly legendTmp: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1435
|
+
/**
|
|
1436
|
+
* A `<hub-legend>` projected as a direct child, which is the way a legend that needs more than
|
|
1437
|
+
* text is written. Queried rather than merely projected because the `<legend>` element must not
|
|
1438
|
+
* be emitted at all when the group has no legend of any kind.
|
|
1439
|
+
*/
|
|
1440
|
+
protected readonly _projectedLegend: _angular_core.Signal<HubLegendComponent | undefined>;
|
|
1387
1441
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubFieldsetComponent, never>;
|
|
1388
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubFieldsetComponent, "hub-fieldset, fieldset[hubFieldset]", never, { "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "classlist": { "alias": "classlist"; "required": false; "isSignal": true; }; }, {}, ["legendTmp"], ["*"], true, never>;
|
|
1442
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubFieldsetComponent, "hub-fieldset, fieldset[hubFieldset]", never, { "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "classlist": { "alias": "classlist"; "required": false; "isSignal": true; }; }, {}, ["legendTmp", "_projectedLegend"], ["hub-legend", "*"], true, never>;
|
|
1389
1443
|
}
|
|
1390
1444
|
|
|
1391
1445
|
/**
|
|
@@ -1420,30 +1474,6 @@ declare class HubFormComponent extends HubGroupControl {
|
|
|
1420
1474
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubFormComponent, "form[hubForm]", never, {}, {}, never, ["*"], true, never>;
|
|
1421
1475
|
}
|
|
1422
1476
|
|
|
1423
|
-
/**
|
|
1424
|
-
* Presentational legend for a `<hub-fieldset>` (or any grouped section), with optional
|
|
1425
|
-
* required/invalid state styling.
|
|
1426
|
-
*
|
|
1427
|
-
* Use it inside a `hubLegend` template, or standalone as a section title.
|
|
1428
|
-
*
|
|
1429
|
-
* @example
|
|
1430
|
-
* ```html
|
|
1431
|
-
* <hub-fieldset [group]="form.controls.address">
|
|
1432
|
-
* <ng-template hubLegend>
|
|
1433
|
-
* <hub-legend [required]="true" [invalid]="form.controls.address.invalid">Shipping address</hub-legend>
|
|
1434
|
-
* </ng-template>
|
|
1435
|
-
* </hub-fieldset>
|
|
1436
|
-
* ```
|
|
1437
|
-
*/
|
|
1438
|
-
declare class HubLegendComponent {
|
|
1439
|
-
/** Whether to render the required indicator. */
|
|
1440
|
-
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1441
|
-
/** Whether to render the invalid state styling. */
|
|
1442
|
-
readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1443
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubLegendComponent, never>;
|
|
1444
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubLegendComponent, "hub-legend", never, { "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
1477
|
/**
|
|
1448
1478
|
* Rendering formats for `<hub-select>`.
|
|
1449
1479
|
*
|
|
@@ -1516,13 +1546,42 @@ declare class HubSelectComponent extends HubFieldControl {
|
|
|
1516
1546
|
protected readonly _labelTypes: typeof HubLabelTypes;
|
|
1517
1547
|
protected readonly _selectFormats: typeof HubSelectFormats;
|
|
1518
1548
|
protected readonly _value: _angular_core.WritableSignal<any>;
|
|
1549
|
+
private readonly _hubOptionTpl;
|
|
1550
|
+
private readonly _ngOptionTpl;
|
|
1519
1551
|
protected readonly _optionTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1552
|
+
private readonly _hubOptgroupTpl;
|
|
1553
|
+
private readonly _ngOptgroupTpl;
|
|
1520
1554
|
protected readonly _optgroupTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1555
|
+
private readonly _hubLabelTpl;
|
|
1556
|
+
private readonly _ngLabelTpl;
|
|
1521
1557
|
protected readonly _labelTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1558
|
+
private readonly _hubMultiLabelTpl;
|
|
1559
|
+
private readonly _ngMultiLabelTpl;
|
|
1522
1560
|
protected readonly _multiLabelTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1561
|
+
private readonly _hubHeaderTpl;
|
|
1562
|
+
private readonly _ngHeaderTpl;
|
|
1523
1563
|
protected readonly _headerTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1564
|
+
private readonly _hubFooterTpl;
|
|
1565
|
+
private readonly _ngFooterTpl;
|
|
1524
1566
|
protected readonly _footerTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1567
|
+
private readonly _hubNotFoundTpl;
|
|
1568
|
+
private readonly _ngNotFoundTpl;
|
|
1525
1569
|
protected readonly _notFoundTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1570
|
+
private readonly _hubTypeToSearchTpl;
|
|
1571
|
+
private readonly _ngTypeToSearchTpl;
|
|
1572
|
+
protected readonly _typeToSearchTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1573
|
+
private readonly _hubLoadingTextTpl;
|
|
1574
|
+
private readonly _ngLoadingTextTpl;
|
|
1575
|
+
protected readonly _loadingTextTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1576
|
+
private readonly _hubLoadingSpinnerTpl;
|
|
1577
|
+
private readonly _ngLoadingSpinnerTpl;
|
|
1578
|
+
protected readonly _loadingSpinnerTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1579
|
+
private readonly _hubTagTpl;
|
|
1580
|
+
private readonly _ngTagTpl;
|
|
1581
|
+
protected readonly _tagTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1582
|
+
private readonly _hubClearButtonTpl;
|
|
1583
|
+
private readonly _ngClearButtonTpl;
|
|
1584
|
+
protected readonly _clearButtonTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1526
1585
|
/** Deprecated select-only slot, superseded by `[hubAppend]`. */
|
|
1527
1586
|
protected readonly _legacySuffixTpl: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
1528
1587
|
/** Projected inline-start content (`[hubPrepend]`). */
|
|
@@ -1770,7 +1829,7 @@ declare class HubSelectComponent extends HubFieldControl {
|
|
|
1770
1829
|
*/
|
|
1771
1830
|
protected toggleItem(item: any): void;
|
|
1772
1831
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectComponent, never>;
|
|
1773
|
-
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; }; "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"; "onFocus": "onFocus"; "onBlur": "onBlur"; "onOpen": "onOpen"; "onClose": "onClose"; "onClear": "onClear"; "onSearch": "onSearch"; "onAdd": "onAdd"; "onRemove": "onRemove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["
|
|
1832
|
+
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; }; "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"; "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>;
|
|
1774
1833
|
}
|
|
1775
1834
|
|
|
1776
1835
|
/** A calendar cell enriched with its selection / range / disabled / focus state. */
|
|
@@ -2524,6 +2583,163 @@ declare class HubFileInputComponent extends HubFieldControl {
|
|
|
2524
2583
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HubFileInputComponent, "hub-file-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelType": { "alias": "labelType"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "minSize": { "alias": "minSize"; "required": false; "isSignal": true; }; "maxTotalSize": { "alias": "maxTotalSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "dragDrop": { "alias": "dragDrop"; "required": false; "isSignal": true; }; "paste": { "alias": "paste"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; "allowDuplicates": { "alias": "allowDuplicates"; "required": false; "isSignal": true; }; "capture": { "alias": "capture"; "required": false; "isSignal": true; }; "autoUpload": { "alias": "autoUpload"; "required": false; "isSignal": true; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "dropText": { "alias": "dropText"; "required": false; "isSignal": true; }; "dropSubtext": { "alias": "dropSubtext"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "classlist": { "alias": "classlist"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "rejected": "rejected"; "fileRemoved": "fileRemoved"; "uploadStateChange": "uploadStateChange"; }, ["iconTpt", "previewTpt", "noticeTpt"], never, true, never>;
|
|
2525
2584
|
}
|
|
2526
2585
|
|
|
2586
|
+
/**
|
|
2587
|
+
* Hub-named slots for the parts of a `<hub-select>` a consumer can re-draw.
|
|
2588
|
+
*
|
|
2589
|
+
* `hub-select` is built on a vendored copy of ng-select (see `PATCHES.md`), whose own slot
|
|
2590
|
+
* directives are attribute selectors in the `ng-*` namespace: `ng-option-tmp`, `ng-label-tmp` and
|
|
2591
|
+
* ten more. Those were re-exported, so the public surface of `ng-hub-ui-forms` invited consumers to
|
|
2592
|
+
* write markup named after an internal dependency that is re-synced from upstream on a schedule and
|
|
2593
|
+
* that no promise here covers. The directives in this file are the surface the library actually
|
|
2594
|
+
* owns: same slots, same template contexts, hub names, and nothing in `vendor/` changed — so the
|
|
2595
|
+
* automated sync stays as low-conflict as it was.
|
|
2596
|
+
*
|
|
2597
|
+
* Each is a plain marker over an `<ng-template>`; `hub-select` queries it and forwards the template
|
|
2598
|
+
* into the engine with the context documented on each directive.
|
|
2599
|
+
*/
|
|
2600
|
+
/**
|
|
2601
|
+
* Draws one option in the dropdown list.
|
|
2602
|
+
*
|
|
2603
|
+
* Context: `item` (the raw item), `item$` (the engine's wrapper, carrying `selected`/`disabled`),
|
|
2604
|
+
* `index`, `searchTerm`.
|
|
2605
|
+
*
|
|
2606
|
+
* @example
|
|
2607
|
+
* ```html
|
|
2608
|
+
* <hub-select [items]="users" bindLabel="name">
|
|
2609
|
+
* <ng-template hubSelectOption let-item="item" let-search="searchTerm">
|
|
2610
|
+
* <img [src]="item.avatar" alt="" /> {{ item.name }}
|
|
2611
|
+
* </ng-template>
|
|
2612
|
+
* </hub-select>
|
|
2613
|
+
* ```
|
|
2614
|
+
*/
|
|
2615
|
+
declare class HubSelectOptionDirective {
|
|
2616
|
+
/** Template reference for the option content. */
|
|
2617
|
+
readonly template: TemplateRef<any>;
|
|
2618
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectOptionDirective, never>;
|
|
2619
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectOptionDirective, "[hubSelectOption]", never, {}, {}, never, never, true, never>;
|
|
2620
|
+
}
|
|
2621
|
+
/**
|
|
2622
|
+
* Draws a group header when the list is grouped with `groupBy`.
|
|
2623
|
+
*
|
|
2624
|
+
* Context: `item`, `item$`, `index`, `searchTerm`.
|
|
2625
|
+
*/
|
|
2626
|
+
declare class HubSelectOptgroupDirective {
|
|
2627
|
+
/** Template reference for the group header content. */
|
|
2628
|
+
readonly template: TemplateRef<any>;
|
|
2629
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectOptgroupDirective, never>;
|
|
2630
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectOptgroupDirective, "[hubSelectOptgroup]", never, {}, {}, never, never, true, never>;
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
* Draws the selected value inside the closed control, in single-select mode.
|
|
2634
|
+
*
|
|
2635
|
+
* Context: `item`, `label`, `clear`.
|
|
2636
|
+
*/
|
|
2637
|
+
declare class HubSelectLabelDirective {
|
|
2638
|
+
/** Template reference for the selected-value content. */
|
|
2639
|
+
readonly template: TemplateRef<any>;
|
|
2640
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectLabelDirective, never>;
|
|
2641
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectLabelDirective, "[hubSelectLabel]", never, {}, {}, never, never, true, never>;
|
|
2642
|
+
}
|
|
2643
|
+
/**
|
|
2644
|
+
* Draws all selected values at once in multiple mode, replacing the per-value chips.
|
|
2645
|
+
*
|
|
2646
|
+
* Context: `items`, `clear`.
|
|
2647
|
+
*/
|
|
2648
|
+
declare class HubSelectMultiLabelDirective {
|
|
2649
|
+
/** Template reference for the multi-value content. */
|
|
2650
|
+
readonly template: TemplateRef<any>;
|
|
2651
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectMultiLabelDirective, never>;
|
|
2652
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectMultiLabelDirective, "[hubSelectMultiLabel]", never, {}, {}, never, never, true, never>;
|
|
2653
|
+
}
|
|
2654
|
+
/**
|
|
2655
|
+
* Draws a fixed block above the option list.
|
|
2656
|
+
*
|
|
2657
|
+
* Context: `searchTerm`.
|
|
2658
|
+
*/
|
|
2659
|
+
declare class HubSelectHeaderDirective {
|
|
2660
|
+
/** Template reference for the dropdown header. */
|
|
2661
|
+
readonly template: TemplateRef<any>;
|
|
2662
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectHeaderDirective, never>;
|
|
2663
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectHeaderDirective, "[hubSelectHeader]", never, {}, {}, never, never, true, never>;
|
|
2664
|
+
}
|
|
2665
|
+
/**
|
|
2666
|
+
* Draws a fixed block below the option list.
|
|
2667
|
+
*
|
|
2668
|
+
* Context: `searchTerm`.
|
|
2669
|
+
*/
|
|
2670
|
+
declare class HubSelectFooterDirective {
|
|
2671
|
+
/** Template reference for the dropdown footer. */
|
|
2672
|
+
readonly template: TemplateRef<any>;
|
|
2673
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectFooterDirective, never>;
|
|
2674
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectFooterDirective, "[hubSelectFooter]", never, {}, {}, never, never, true, never>;
|
|
2675
|
+
}
|
|
2676
|
+
/**
|
|
2677
|
+
* Replaces the "no items found" message.
|
|
2678
|
+
*
|
|
2679
|
+
* Context: `searchTerm`.
|
|
2680
|
+
*/
|
|
2681
|
+
declare class HubSelectNotFoundDirective {
|
|
2682
|
+
/** Template reference for the empty-result content. */
|
|
2683
|
+
readonly template: TemplateRef<any>;
|
|
2684
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectNotFoundDirective, never>;
|
|
2685
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectNotFoundDirective, "[hubSelectNotFound]", never, {}, {}, never, never, true, never>;
|
|
2686
|
+
}
|
|
2687
|
+
/**
|
|
2688
|
+
* Replaces the "type to search" hint shown before `minTermLength` characters have been typed.
|
|
2689
|
+
*
|
|
2690
|
+
* No context.
|
|
2691
|
+
*/
|
|
2692
|
+
declare class HubSelectTypeToSearchDirective {
|
|
2693
|
+
/** Template reference for the type-to-search hint. */
|
|
2694
|
+
readonly template: TemplateRef<any>;
|
|
2695
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectTypeToSearchDirective, never>;
|
|
2696
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectTypeToSearchDirective, "[hubSelectTypeToSearch]", never, {}, {}, never, never, true, never>;
|
|
2697
|
+
}
|
|
2698
|
+
/**
|
|
2699
|
+
* Replaces the "loading…" message shown while a typeahead is in flight and no item has arrived.
|
|
2700
|
+
*
|
|
2701
|
+
* Context: `searchTerm`.
|
|
2702
|
+
*/
|
|
2703
|
+
declare class HubSelectLoadingTextDirective {
|
|
2704
|
+
/** Template reference for the loading message. */
|
|
2705
|
+
readonly template: TemplateRef<any>;
|
|
2706
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectLoadingTextDirective, never>;
|
|
2707
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectLoadingTextDirective, "[hubSelectLoadingText]", never, {}, {}, never, never, true, never>;
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* Replaces the spinner drawn in the control while `loading` is set.
|
|
2711
|
+
*
|
|
2712
|
+
* No context.
|
|
2713
|
+
*/
|
|
2714
|
+
declare class HubSelectLoadingSpinnerDirective {
|
|
2715
|
+
/** Template reference for the loading spinner. */
|
|
2716
|
+
readonly template: TemplateRef<any>;
|
|
2717
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectLoadingSpinnerDirective, never>;
|
|
2718
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectLoadingSpinnerDirective, "[hubSelectLoadingSpinner]", never, {}, {}, never, never, true, never>;
|
|
2719
|
+
}
|
|
2720
|
+
/**
|
|
2721
|
+
* Replaces the "add <term>" row offered when `addTag` is enabled.
|
|
2722
|
+
*
|
|
2723
|
+
* Context: `searchTerm`.
|
|
2724
|
+
*/
|
|
2725
|
+
declare class HubSelectTagDirective {
|
|
2726
|
+
/** Template reference for the add-tag row. */
|
|
2727
|
+
readonly template: TemplateRef<any>;
|
|
2728
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectTagDirective, never>;
|
|
2729
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectTagDirective, "[hubSelectTag]", never, {}, {}, never, never, true, never>;
|
|
2730
|
+
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Replaces the clear (×) control.
|
|
2733
|
+
*
|
|
2734
|
+
* No context.
|
|
2735
|
+
*/
|
|
2736
|
+
declare class HubSelectClearButtonDirective {
|
|
2737
|
+
/** Template reference for the clear control. */
|
|
2738
|
+
readonly template: TemplateRef<any>;
|
|
2739
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HubSelectClearButtonDirective, never>;
|
|
2740
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HubSelectClearButtonDirective, "[hubSelectClearButton]", never, {}, {}, never, never, true, never>;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2527
2743
|
declare class NgOptionComponent implements OnInit {
|
|
2528
2744
|
readonly value: _angular_core.InputSignal<any>;
|
|
2529
2745
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -2618,11 +2834,24 @@ declare class HubFormTextDirective {
|
|
|
2618
2834
|
/**
|
|
2619
2835
|
* Marks a template as the legend content of a `<hub-fieldset>`.
|
|
2620
2836
|
*
|
|
2837
|
+
* @deprecated Project a `<hub-legend>` element as a direct child of the fieldset instead. The slot
|
|
2838
|
+
* existed only so a legend could carry markup, and `<hub-legend>` carries markup on its own —
|
|
2839
|
+
* without an `ng-template`, without a second directive to import, and producing the same DOM the
|
|
2840
|
+
* `legend` input produces, so the library has one answer to "how is a legend written". The slot
|
|
2841
|
+
* keeps working until it is removed in **23.0.0**; a fieldset that still uses it renders exactly as
|
|
2842
|
+
* before, so nothing breaks by doing nothing before then.
|
|
2843
|
+
*
|
|
2621
2844
|
* @example
|
|
2622
2845
|
* ```html
|
|
2846
|
+
* <!-- before -->
|
|
2623
2847
|
* <hub-fieldset formGroupName="address">
|
|
2624
2848
|
* <ng-template hubLegend>Shipping address <span class="badge">required</span></ng-template>
|
|
2625
2849
|
* </hub-fieldset>
|
|
2850
|
+
*
|
|
2851
|
+
* <!-- after -->
|
|
2852
|
+
* <hub-fieldset formGroupName="address">
|
|
2853
|
+
* <hub-legend>Shipping address <span class="badge">required</span></hub-legend>
|
|
2854
|
+
* </hub-fieldset>
|
|
2626
2855
|
* ```
|
|
2627
2856
|
*/
|
|
2628
2857
|
declare class HubLegendDirective {
|
|
@@ -2671,8 +2900,8 @@ declare class HubAutoresizeDirective implements OnInit {
|
|
|
2671
2900
|
* content is always the outermost element on that side.
|
|
2672
2901
|
*
|
|
2673
2902
|
* Declared as a template rather than plain projected content because a field's `<ng-content>`
|
|
2674
|
-
* is already spoken for — the select's
|
|
2675
|
-
*
|
|
2903
|
+
* is already spoken for — the select's opens straight into the dropdown engine, and the input
|
|
2904
|
+
* projects its in-field affixes — so anything projected plainly would land in the wrong
|
|
2676
2905
|
* place. Rendering from a template also fixes the DOM order, which is what keeps tabbing sane
|
|
2677
2906
|
* around an attached button.
|
|
2678
2907
|
*
|
|
@@ -2720,7 +2949,7 @@ declare class HubPrependDirective {
|
|
|
2720
2949
|
* the box and shares its border, so the two read as one field with an action on it.
|
|
2721
2950
|
*
|
|
2722
2951
|
* Declared as a template rather than plain projected content because a field's `<ng-content>`
|
|
2723
|
-
* is already spoken for — the select's
|
|
2952
|
+
* is already spoken for — the select's opens straight into the dropdown engine — so
|
|
2724
2953
|
* anything projected plainly would land in the wrong place. Rendering from a template also
|
|
2725
2954
|
* keeps the action after the control in the DOM, so tabbing reaches the field before the button
|
|
2726
2955
|
* acting on it.
|
|
@@ -2751,7 +2980,7 @@ declare class HubAppendDirective {
|
|
|
2751
2980
|
* one field with an action on it.
|
|
2752
2981
|
*
|
|
2753
2982
|
* Declared as a template rather than projected content because the select's catch-all
|
|
2754
|
-
* `<ng-content>` — which
|
|
2983
|
+
* `<ng-content>` — which opens straight into the dropdown engine — is declared first
|
|
2755
2984
|
* and would swallow it. Rendering from a template also keeps the action after the control
|
|
2756
2985
|
* in the DOM, so tabbing reaches the field before the button acting on it.
|
|
2757
2986
|
*
|
|
@@ -3123,10 +3352,11 @@ declare function uuid(): string;
|
|
|
3123
3352
|
/**
|
|
3124
3353
|
* Returns the active element within the given root, descending into shadow roots when needed.
|
|
3125
3354
|
*
|
|
3126
|
-
* @param root - The document or shadow root to search. Defaults to
|
|
3355
|
+
* @param root - The document or shadow root to search. Defaults to the global document when there
|
|
3356
|
+
* is one; on a server render there is not, and nothing has focus there anyway.
|
|
3127
3357
|
* @returns The deepest active element, or `null`.
|
|
3128
3358
|
*/
|
|
3129
|
-
declare function getActiveElement(root?: Document | ShadowRoot): Element | null;
|
|
3359
|
+
declare function getActiveElement(root?: Document | ShadowRoot | null): Element | null;
|
|
3130
3360
|
|
|
3131
3361
|
/**
|
|
3132
3362
|
* Pattern-mask utilities for `hub-input`.
|
|
@@ -3228,5 +3458,5 @@ interface HubFormControlAdapter {
|
|
|
3228
3458
|
*/
|
|
3229
3459
|
declare const hubFormControlAdapter: HubFormControlAdapter;
|
|
3230
3460
|
|
|
3231
|
-
export { FormTextTypes, HUB_FILE_UPLOADER, HUB_FORMS_CONFIG, HubAppendDirective, HubAutoresizeDirective, HubDatepickerComponent, HubFieldControl, HubFieldsetComponent, HubFileDropzoneNoticeDirective, HubFileIconDirective, HubFileInputComponent, HubFilePreviewDirective, HubFormComponent, HubFormControl, HubFormTextDirective, HubGroupControl, HubInputComponent, HubInputFormats, HubInputPrefixDirective, HubInputSuffixDirective, HubInvertColorPipe, HubJoinButLastPipe, HubLabelTypes, HubLegendComponent, HubLegendDirective, HubMapPipe, HubOtpInputComponent, HubPrependDirective, HubSafeUrlPipe, HubSegmentedComponent, HubSegmentedOptionDirective, HubSelectComponent, HubSelectFormats, HubSelectSuffixDirective, HubSliderComponent, HubSnakeUpperPipe, HubTextareaComponent, HubTimepickerComponent, HubUcfirstPipe, HubValidationErrorDirective, NgClearButtonTemplateDirective, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectConfig, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, applyMask, areEqual, camelToSnakeUpper, controlHasMinOrMaxValidator, defaultHubDatepickerConfig, defaultHubDatepickerLabels, defaultHubFileInputLabels, defaultHubFormsConfig, defaultHubPasswordLabels, defaultInvalidFeedback, fileKey, formatFileSize, get, getActiveElement, getMinOrMaxValueFromValidator, hubAcceptedFiles, hubAreEqual, hubFormControlAdapter, hubMaxFileSize, hubMaxFiles, hubMaxTotalSize, hubMinFileSize, hubMinFiles, isDefined, isMaskActive, isString, joinButLast, matchesAccept, provideHubFileUploader, provideHubForms, runInZone, scorePasswordStrength, toFileArray, uuid };
|
|
3461
|
+
export { FormTextTypes, HUB_FILE_UPLOADER, HUB_FORMS_CONFIG, HubAppendDirective, HubAutoresizeDirective, HubDatepickerComponent, HubFieldControl, HubFieldsetComponent, HubFileDropzoneNoticeDirective, HubFileIconDirective, HubFileInputComponent, HubFilePreviewDirective, HubFormComponent, HubFormControl, HubFormTextDirective, HubGroupControl, HubInputComponent, HubInputFormats, HubInputPrefixDirective, HubInputSuffixDirective, HubInvertColorPipe, HubJoinButLastPipe, HubLabelTypes, HubLegendComponent, HubLegendDirective, HubMapPipe, HubOtpInputComponent, HubPrependDirective, HubSafeUrlPipe, HubSegmentedComponent, HubSegmentedOptionDirective, HubSelectClearButtonDirective, HubSelectComponent, HubSelectFooterDirective, HubSelectFormats, HubSelectHeaderDirective, HubSelectLabelDirective, HubSelectLoadingSpinnerDirective, HubSelectLoadingTextDirective, HubSelectMultiLabelDirective, HubSelectNotFoundDirective, HubSelectOptgroupDirective, HubSelectOptionDirective, HubSelectSuffixDirective, HubSelectTagDirective, HubSelectTypeToSearchDirective, HubSliderComponent, HubSnakeUpperPipe, HubTextareaComponent, HubTimepickerComponent, HubUcfirstPipe, HubValidationErrorDirective, NgClearButtonTemplateDirective, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectConfig, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, applyMask, areEqual, camelToSnakeUpper, controlHasMinOrMaxValidator, defaultHubDatepickerConfig, defaultHubDatepickerLabels, defaultHubFileInputLabels, defaultHubFormsConfig, defaultHubPasswordLabels, defaultInvalidFeedback, fileKey, formatFileSize, get, getActiveElement, getMinOrMaxValueFromValidator, hubAcceptedFiles, hubAreEqual, hubFormControlAdapter, hubMaxFileSize, hubMaxFiles, hubMaxTotalSize, hubMinFileSize, hubMinFiles, isDefined, isMaskActive, isString, joinButLast, matchesAccept, provideHubFileUploader, provideHubForms, runInZone, scorePasswordStrength, toFileArray, uuid };
|
|
3232
3462
|
export type { FormTextType, HubDateRange, HubDateValue, HubDatepickerConfig, HubDatepickerGranularity, HubDatepickerLabels, HubDatepickerMode, HubDatepickerValueFormat, HubFileConstraints, HubFileIconContext, HubFileInputLabels, HubFileItem, HubFilePreview, HubFilePreviewContext, HubFileRejection, HubFileRejectionReason, HubFileStatus, HubFileUploadEvent, HubFileUploader, HubFileValue, HubFormControlAdapter, HubFormControlConfig, HubFormControlHandle, HubFormControlOption, HubFormsConfig, HubGroupErrorTrigger, HubInputFormat, HubLabelType, HubMaskResult, HubOtpMode, HubPasswordLabels, HubPasswordStrengthScore, HubSegmentedOption, HubSegmentedOptionContext, HubSegmentedSize, HubSelectFormat, HubSliderValue };
|