@vsn-ux/ngx-gaia 0.9.3 → 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 +995 -0
- package/fesm2022/vsn-ux-ngx-gaia.mjs +139 -50
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/index.d.ts +77 -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,10 +589,29 @@ 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
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @internal - Internal service for form field coordination
|
|
609
|
+
*/
|
|
604
610
|
declare class GaFormFieldConnector {
|
|
605
611
|
readonly controlDisabled: _angular_core.WritableSignal<boolean>;
|
|
606
612
|
readonly controlId: _angular_core.WritableSignal<string | null>;
|
|
607
613
|
readonly labelId: _angular_core.WritableSignal<string | null>;
|
|
614
|
+
readonly control: _angular_core.WritableSignal<GaFormControlDirective | null>;
|
|
608
615
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormFieldConnector, never>;
|
|
609
616
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GaFormFieldConnector>;
|
|
610
617
|
}
|
|
@@ -614,11 +621,11 @@ declare class GaFormFieldComponent {
|
|
|
614
621
|
readonly formFieldConnector: GaFormFieldConnector;
|
|
615
622
|
readonly disabledInput: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
616
623
|
readonly disabled: _angular_core.Signal<boolean>;
|
|
617
|
-
readonly formControl: _angular_core.Signal<GaFormControlDirective |
|
|
624
|
+
readonly formControl: _angular_core.Signal<_vsn_ux_ngx_gaia.GaFormControlDirective | null>;
|
|
618
625
|
readonly fieldInfo: _angular_core.Signal<GaFieldInfoComponent | undefined>;
|
|
619
626
|
readonly fieldErrors: _angular_core.Signal<readonly GaFieldErrorDirective[]>;
|
|
620
627
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaFormFieldComponent, never>;
|
|
621
|
-
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>;
|
|
622
629
|
}
|
|
623
630
|
|
|
624
631
|
declare class GaFieldLabelComponent {
|
|
@@ -660,6 +667,43 @@ declare class GaFormFieldModule {
|
|
|
660
667
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<GaFormFieldModule>;
|
|
661
668
|
}
|
|
662
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
|
+
|
|
663
707
|
declare class GaMenuComponent {
|
|
664
708
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaMenuComponent, never>;
|
|
665
709
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GaMenuComponent, "ga-menu", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkMenu; inputs: {}; outputs: {}; }]>;
|
|
@@ -917,6 +961,12 @@ type GaTooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
|
917
961
|
type GaTooltipDirection = 'start' | 'end' | 'center';
|
|
918
962
|
type GaTooltipPlacement = `${GaTooltipPosition}-${GaTooltipDirection}`;
|
|
919
963
|
type GaTooltipControlMode = 'hover' | 'click' | 'none';
|
|
964
|
+
/**
|
|
965
|
+
* Internal tooltip component used by the gaTooltip directive.
|
|
966
|
+
* This component is not intended for direct use in templates.
|
|
967
|
+
* Use the [gaTooltip] directive instead.
|
|
968
|
+
* @internal
|
|
969
|
+
*/
|
|
920
970
|
declare class GaTooltipComponent {
|
|
921
971
|
readonly uniqueId: string;
|
|
922
972
|
private mouseLeaveSubject;
|
|
@@ -1127,7 +1177,13 @@ declare class GaSelectDropdownSpinnerComponent {
|
|
|
1127
1177
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GaSelectDropdownSpinnerComponent, "ga-select-dropdown-spinner", never, {}, {}, never, never, true, never>;
|
|
1128
1178
|
}
|
|
1129
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* @internal - Internal validator provider for ga-select required validation
|
|
1182
|
+
*/
|
|
1130
1183
|
declare const GA_SELECT_REQUIRED_VALIDATOR: Provider;
|
|
1184
|
+
/**
|
|
1185
|
+
* @internal - Internal directive for ga-select required validation
|
|
1186
|
+
*/
|
|
1131
1187
|
declare class GaSelectRequiredValidator extends RequiredValidator {
|
|
1132
1188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GaSelectRequiredValidator, never>;
|
|
1133
1189
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GaSelectRequiredValidator, "ga-select[required][formControlName], ga-select[required][formControl], ga-select[required][ngModel]", never, {}, {}, never, never, true, never>;
|
|
@@ -1302,6 +1358,9 @@ interface GaFormControlAdapter {
|
|
|
1302
1358
|
readonly ngFormSubmitted: Signal<boolean>;
|
|
1303
1359
|
}
|
|
1304
1360
|
declare const GA_FORM_CONTROL_ADAPTER: InjectionToken<GaFormControlAdapter>;
|
|
1361
|
+
/**
|
|
1362
|
+
* @internal - This function is for internal library use only
|
|
1363
|
+
*/
|
|
1305
1364
|
declare function injectNgControlState({ implicitChildNgControl, explicitNgControl, explicitNgForm, }?: {
|
|
1306
1365
|
implicitChildNgControl?: Signal<NgControl | undefined | null>;
|
|
1307
1366
|
explicitNgControl?: NgControl | Signal<NgControl | undefined | null> | null;
|
|
@@ -1357,5 +1416,5 @@ declare class GaTextAreaModule {
|
|
|
1357
1416
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<GaTextAreaModule>;
|
|
1358
1417
|
}
|
|
1359
1418
|
|
|
1360
|
-
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 };
|
|
1361
|
-
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 };
|