@vsn-ux/ngx-gaia 0.9.4 → 0.9.5
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/DOCS.md +44 -0
- package/fesm2022/vsn-ux-ngx-gaia.mjs +119 -50
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/index.d.ts +59 -18
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as lucide_angular from 'lucide-angular';
|
|
2
2
|
import { X, LucideIconData } from 'lucide-angular';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { Provider, Type, OnInit, InjectionToken, TemplateRef, WritableSignal, AfterViewInit, Renderer2, ElementRef,
|
|
4
|
+
import { Provider, Type, OnInit, InjectionToken, TemplateRef, OnDestroy, EnvironmentProviders, WritableSignal, AfterViewInit, Renderer2, ElementRef, AfterContentInit, Signal } from '@angular/core';
|
|
5
5
|
import * as _angular_forms from '@angular/forms';
|
|
6
6
|
import { ControlValueAccessor, CheckboxRequiredValidator, Validator, AbstractControl, ValidationErrors, NgControl, RequiredValidator, FormGroupDirective, NgForm } from '@angular/forms';
|
|
7
7
|
import * as _angular_cdk_overlay from '@angular/cdk/overlay';
|
|
8
8
|
import { CdkOverlayOrigin, ConnectedPosition, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
9
|
-
import * as i1 from '@angular/cdk/menu';
|
|
10
9
|
import * as _vsn_ux_ngx_gaia from '@vsn-ux/ngx-gaia';
|
|
10
|
+
import * as i1 from '@angular/cdk/menu';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Observable, Subject } from 'rxjs';
|
|
13
13
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
@@ -576,18 +576,6 @@ declare class GaInputModule {
|
|
|
576
576
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<GaInputModule>;
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
declare class GaFormControlDirective {
|
|
580
|
-
private readonly formFieldId;
|
|
581
|
-
readonly ngControlInput: _angular_core.InputSignal<string | NgControl | undefined>;
|
|
582
|
-
private readonly explicitNgControl;
|
|
583
|
-
private readonly ngControlState;
|
|
584
|
-
readonly inError: _angular_core.Signal<boolean>;
|
|
585
|
-
readonly errors: _angular_core.Signal<_angular_forms.ValidationErrors>;
|
|
586
|
-
readonly ariaErrorMessageId: _angular_core.Signal<string | null>;
|
|
587
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormControlDirective, never>;
|
|
588
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GaFormControlDirective, "[gaFormControl]", ["gaFormControl"], { "ngControlInput": { "alias": "gaFormControl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
579
|
declare class GaFieldInfoComponent {
|
|
592
580
|
readonly templateRef: _angular_core.Signal<TemplateRef<any>>;
|
|
593
581
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFieldInfoComponent, never>;
|
|
@@ -601,6 +589,21 @@ declare class GaFieldErrorDirective {
|
|
|
601
589
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GaFieldErrorDirective, "[gaError]", never, { "key": { "alias": "gaError"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
602
590
|
}
|
|
603
591
|
|
|
592
|
+
declare class GaFormControlDirective implements OnInit, OnDestroy {
|
|
593
|
+
private readonly formFieldId;
|
|
594
|
+
private readonly formFieldConnector;
|
|
595
|
+
readonly ngControlInput: _angular_core.InputSignal<string | NgControl | undefined>;
|
|
596
|
+
private readonly explicitNgControl;
|
|
597
|
+
private readonly ngControlState;
|
|
598
|
+
readonly inError: _angular_core.Signal<boolean>;
|
|
599
|
+
readonly errors: _angular_core.Signal<_angular_forms.ValidationErrors>;
|
|
600
|
+
readonly ariaErrorMessageId: _angular_core.Signal<string | null>;
|
|
601
|
+
ngOnInit(): void;
|
|
602
|
+
ngOnDestroy(): void;
|
|
603
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormControlDirective, never>;
|
|
604
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GaFormControlDirective, "[gaFormControl]", ["gaFormControl"], { "ngControlInput": { "alias": "gaFormControl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
605
|
+
}
|
|
606
|
+
|
|
604
607
|
/**
|
|
605
608
|
* @internal - Internal service for form field coordination
|
|
606
609
|
*/
|
|
@@ -608,6 +611,7 @@ declare class GaFormFieldConnector {
|
|
|
608
611
|
readonly controlDisabled: _angular_core.WritableSignal<boolean>;
|
|
609
612
|
readonly controlId: _angular_core.WritableSignal<string | null>;
|
|
610
613
|
readonly labelId: _angular_core.WritableSignal<string | null>;
|
|
614
|
+
readonly control: _angular_core.WritableSignal<GaFormControlDirective | null>;
|
|
611
615
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormFieldConnector, never>;
|
|
612
616
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GaFormFieldConnector>;
|
|
613
617
|
}
|
|
@@ -617,11 +621,11 @@ declare class GaFormFieldComponent {
|
|
|
617
621
|
readonly formFieldConnector: GaFormFieldConnector;
|
|
618
622
|
readonly disabledInput: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
619
623
|
readonly disabled: _angular_core.Signal<boolean>;
|
|
620
|
-
readonly formControl: _angular_core.Signal<GaFormControlDirective |
|
|
624
|
+
readonly formControl: _angular_core.Signal<_vsn_ux_ngx_gaia.GaFormControlDirective | null>;
|
|
621
625
|
readonly fieldInfo: _angular_core.Signal<GaFieldInfoComponent | undefined>;
|
|
622
626
|
readonly fieldErrors: _angular_core.Signal<readonly GaFieldErrorDirective[]>;
|
|
623
627
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormFieldComponent, never>;
|
|
624
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GaFormFieldComponent, "ga-form-field", ["gaFormField"], { "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["
|
|
628
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GaFormFieldComponent, "ga-form-field", ["gaFormField"], { "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["fieldInfo", "fieldErrors"], ["ga-label", "*"], true, never>;
|
|
625
629
|
}
|
|
626
630
|
|
|
627
631
|
declare class GaFieldLabelComponent {
|
|
@@ -663,6 +667,43 @@ declare class GaFormFieldModule {
|
|
|
663
667
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<GaFormFieldModule>;
|
|
664
668
|
}
|
|
665
669
|
|
|
670
|
+
type GaFormErrorMessage = string | ((error: any) => string);
|
|
671
|
+
type GaFormErrorsMap = Record<string, GaFormErrorMessage>;
|
|
672
|
+
type GaFormErrorsConfig = GaFormErrorsMap | (() => GaFormErrorsMap);
|
|
673
|
+
declare const GA_FORM_ERRORS: InjectionToken<GaFormErrorsMap>;
|
|
674
|
+
/**
|
|
675
|
+
* Provides global form error messages that can be used across the application.
|
|
676
|
+
* These errors will be displayed when a form control has validation errors
|
|
677
|
+
* but no specific gaError directive template is provided.
|
|
678
|
+
*
|
|
679
|
+
* @param config - Either a static record of error messages or a factory function
|
|
680
|
+
* @returns EnvironmentProviders for configuring global form errors
|
|
681
|
+
*
|
|
682
|
+
* @example
|
|
683
|
+
* ```ts
|
|
684
|
+
* // Static configuration
|
|
685
|
+
* provideGaFormErrors({
|
|
686
|
+
* required: 'This field is required',
|
|
687
|
+
* email: 'Please enter a valid email address',
|
|
688
|
+
* minlength: 'Input is too short'
|
|
689
|
+
* })
|
|
690
|
+
*
|
|
691
|
+
* // Dynamic configuration with functions that access error data
|
|
692
|
+
* provideGaFormErrors({
|
|
693
|
+
* required: 'This field is required',
|
|
694
|
+
* minlength: (error) => `Minimum ${error.requiredLength} characters required`,
|
|
695
|
+
* pattern: (error) => `Input format is invalid. Expected pattern: ${error.requiredPattern}`
|
|
696
|
+
* })
|
|
697
|
+
*
|
|
698
|
+
* // Factory function for lazy evaluation
|
|
699
|
+
* provideGaFormErrors(() => ({
|
|
700
|
+
* required: translateService.get('errors.required'),
|
|
701
|
+
* email: translateService.get('errors.email')
|
|
702
|
+
* }))
|
|
703
|
+
* ```
|
|
704
|
+
*/
|
|
705
|
+
declare function provideGaFormErrors(config: GaFormErrorsConfig): EnvironmentProviders;
|
|
706
|
+
|
|
666
707
|
declare class GaMenuComponent {
|
|
667
708
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaMenuComponent, never>;
|
|
668
709
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GaMenuComponent, "ga-menu", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenu; inputs: {}; outputs: {}; }]>;
|
|
@@ -1375,5 +1416,5 @@ declare class GaTextAreaModule {
|
|
|
1375
1416
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<GaTextAreaModule>;
|
|
1376
1417
|
}
|
|
1377
1418
|
|
|
1378
|
-
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
|
|
1379
|
-
export type { GaAlertVariant, GaBadgeType, GaBadgeVariant, GaButtonType, GaDatepickerFormats, GaDatepickerStruct, GaFormControlAdapter, GaIconButtonVariant, GaIconData, GaLinkSize, GaLinkVariant, GaModalRole, GaModalSize, GaModalType, GaTooltipControlMode, GaTooltipDirection, GaTooltipPlacement, GaTooltipPosition, IGaDatepickerI18n };
|
|
1419
|
+
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_FORM_ERRORS, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaFormErrors, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
|
|
1420
|
+
export type { GaAlertVariant, GaBadgeType, GaBadgeVariant, GaButtonType, GaDatepickerFormats, GaDatepickerStruct, GaFormControlAdapter, GaFormErrorMessage, GaFormErrorsConfig, GaFormErrorsMap, GaIconButtonVariant, GaIconData, GaLinkSize, GaLinkVariant, GaModalRole, GaModalSize, GaModalType, GaTooltipControlMode, GaTooltipDirection, GaTooltipPlacement, GaTooltipPosition, IGaDatepickerI18n };
|