ng-hub-ui-forms 22.1.2 → 22.2.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.
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-forms",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Accessible, signal-based form fields for Angular (input, textarea, slider, select, datepicker) 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)",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, AfterContentInit, OnDestroy, TemplateRef, ElementRef, InjectionToken, EnvironmentProviders, PipeTransform, NgZone } from '@angular/core';
|
|
2
|
+
import { OnInit, AfterContentInit, OnDestroy, TemplateRef, ElementRef, InjectionToken, EnvironmentProviders, PipeTransform, NgZone, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { NgControl, ControlContainer, ControlValueAccessor, ValidationErrors, AbstractControl, ValidatorFn } from '@angular/forms';
|
|
4
4
|
import { Subject, OperatorFunction } from 'rxjs';
|
|
5
5
|
import * as ng_hub_ui_forms from 'ng-hub-ui-forms';
|
|
@@ -1478,5 +1478,52 @@ declare function isMaskActive(mask: string | null | undefined): boolean;
|
|
|
1478
1478
|
*/
|
|
1479
1479
|
declare function applyMask(value: string | null | undefined, mask: string): HubMaskResult;
|
|
1480
1480
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
/** A `{ value, label }` option for select-kind controls. */
|
|
1482
|
+
interface HubFormControlOption {
|
|
1483
|
+
value: unknown;
|
|
1484
|
+
label: string;
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Framework-neutral description of a primitive control to render dynamically.
|
|
1488
|
+
*
|
|
1489
|
+
* The shape mirrors (structurally) the contract other ng-hub-ui libraries expose
|
|
1490
|
+
* for optional control hosting (e.g. `ng-hub-ui-paginable`'s table), so this
|
|
1491
|
+
* adapter can be wired into them without either package importing the other.
|
|
1492
|
+
*/
|
|
1493
|
+
interface HubFormControlConfig {
|
|
1494
|
+
kind: 'input' | 'select';
|
|
1495
|
+
value: unknown;
|
|
1496
|
+
type?: string;
|
|
1497
|
+
placeholder?: string;
|
|
1498
|
+
ariaLabel?: string;
|
|
1499
|
+
cssClass?: string;
|
|
1500
|
+
options?: ReadonlyArray<HubFormControlOption>;
|
|
1501
|
+
onValueChange: (value: unknown) => void;
|
|
1502
|
+
}
|
|
1503
|
+
/** Live handle to a control created by {@link hubFormControlAdapter}. */
|
|
1504
|
+
interface HubFormControlHandle {
|
|
1505
|
+
/** Pushes a new value into the control (external updates). */
|
|
1506
|
+
setValue(value: unknown): void;
|
|
1507
|
+
/** Destroys the control and releases its resources. */
|
|
1508
|
+
destroy(): void;
|
|
1509
|
+
}
|
|
1510
|
+
/** Adapter that renders primitive controls with the ng-hub-ui-forms components. */
|
|
1511
|
+
interface HubFormControlAdapter {
|
|
1512
|
+
create(container: ViewContainerRef, config: HubFormControlConfig): HubFormControlHandle;
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* Ready-made {@link HubFormControlAdapter} backed by `HubInputComponent` /
|
|
1516
|
+
* `HubSelectComponent`.
|
|
1517
|
+
*
|
|
1518
|
+
* Wire it into any ng-hub-ui primitive that exposes an optional form-controls
|
|
1519
|
+
* token, e.g. `provideHubPaginableFormControls(hubFormControlAdapter)`. The host
|
|
1520
|
+
* library keeps **zero hard dependency** on `ng-hub-ui-forms`; only an app that
|
|
1521
|
+
* opts in pulls these components.
|
|
1522
|
+
*
|
|
1523
|
+
* Requires `provideHubForms()` (or the default config) to be available in the
|
|
1524
|
+
* environment so the field components can resolve their configuration.
|
|
1525
|
+
*/
|
|
1526
|
+
declare const hubFormControlAdapter: HubFormControlAdapter;
|
|
1527
|
+
|
|
1528
|
+
export { FormTextTypes, HUB_FORMS_CONFIG, HubAutoresizeDirective, HubDatepickerComponent, HubFieldControl, HubFieldsetComponent, HubFormComponent, HubFormControl, HubFormTextDirective, HubGroupControl, HubInputComponent, HubInputFormats, HubInvertColorPipe, HubJoinButLastPipe, HubLabelTypes, HubLegendComponent, HubLegendDirective, HubMapPipe, HubOtpInputComponent, HubSafeUrlPipe, HubSelectComponent, HubSelectFormats, HubSliderComponent, HubSnakeUpperPipe, HubTextareaComponent, HubUcfirstPipe, HubValidationErrorDirective, NgClearButtonTemplateDirective, NgFooterTemplateDirective, NgHeaderTemplateDirective, NgLabelTemplateDirective, NgLoadingSpinnerTemplateDirective, NgLoadingTextTemplateDirective, NgMultiLabelTemplateDirective, NgNotFoundTemplateDirective, NgOptgroupTemplateDirective, NgOptionComponent, NgOptionTemplateDirective, NgSelectConfig, NgTagTemplateDirective, NgTypeToSearchTemplateDirective, applyMask, areEqual, camelToSnakeUpper, controlHasMinOrMaxValidator, defaultHubDatepickerConfig, defaultHubDatepickerLabels, defaultHubFormsConfig, defaultInvalidFeedback, get, getActiveElement, getMinOrMaxValueFromValidator, hubAreEqual, hubFormControlAdapter, isDefined, isMaskActive, isString, joinButLast, provideHubForms, runInZone, uuid };
|
|
1529
|
+
export type { FormTextType, HubDateRange, HubDateValue, HubDatepickerConfig, HubDatepickerLabels, HubDatepickerMode, HubFormControlAdapter, HubFormControlConfig, HubFormControlHandle, HubFormControlOption, HubFormsConfig, HubGroupErrorTrigger, HubInputFormat, HubLabelType, HubMaskResult, HubOtpMode, HubSelectFormat, HubSliderValue };
|
|
Binary file
|