@theseam/ui-common 1.0.2-beta.42 → 1.0.2-beta.44
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/framework/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ValidatorFn, AsyncValidatorFn, FormControl, FormGroup, AbstractControl } from '@angular/forms';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { DestroyRef, ElementRef, TemplateRef, OnInit, InjectionToken, OnDestroy, EventEmitter, ComponentRef, EmbeddedViewRef, AfterViewInit, QueryList, ViewContainerRef, AfterContentInit } from '@angular/core';
|
|
3
|
+
import { DestroyRef, DoCheck, ElementRef, TemplateRef, OnInit, InjectionToken, OnDestroy, EventEmitter, ComponentRef, EmbeddedViewRef, AfterViewInit, QueryList, ViewContainerRef, AfterContentInit } from '@angular/core';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
|
-
import { Observable, Subscription,
|
|
5
|
+
import { Observable, Subscription, BehaviorSubject, Subject } from 'rxjs';
|
|
6
|
+
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
6
7
|
import { HasElementRef, CanDisableCtor } from '@theseam/ui-common/core';
|
|
7
8
|
import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
|
|
8
9
|
import { TemplatePortal, ComponentType, ComponentPortal, BasePortalOutlet, Portal, CdkPortalOutletAttachedRef } from '@angular/cdk/portal';
|
|
@@ -10,7 +11,6 @@ import { MediaQueryAliases, TheSeamLayoutService } from '@theseam/ui-common/layo
|
|
|
10
11
|
import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
|
|
11
12
|
import { CdkDrag, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
12
13
|
import { TheSeamElementResizedEvent } from '@theseam/ui-common/shared';
|
|
13
|
-
import { SeamIcon } from '@theseam/ui-common/icon';
|
|
14
14
|
import { ThemeTypes } from '@theseam/ui-common/models';
|
|
15
15
|
import * as i3 from '@angular/router';
|
|
16
16
|
import { UrlCreationOptions, IsActiveMatchOptions, Router, ActivatedRoute, RouterOutlet, Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, ViewTransitionInfo } from '@angular/router';
|
|
@@ -87,6 +87,16 @@ type TheSeamAddressFormGroupResult<T extends TheSeamAddressFormGroupOptions> = T
|
|
|
87
87
|
subscription: Subscription;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
+
interface TheSeamPasswordFieldConfig {
|
|
91
|
+
minLength: number;
|
|
92
|
+
}
|
|
93
|
+
declare const DEFAULT_PASSWORD_FIELD_CONFIG: TheSeamPasswordFieldConfig;
|
|
94
|
+
|
|
95
|
+
interface TheSeamPasswordFormValue {
|
|
96
|
+
password1: string | null;
|
|
97
|
+
password2: string | null;
|
|
98
|
+
}
|
|
99
|
+
|
|
90
100
|
declare function isCountryUSA(control: AbstractControl): boolean;
|
|
91
101
|
|
|
92
102
|
/**
|
|
@@ -107,6 +117,55 @@ type TheSeamUserExistsFn = (userName: string) => Promise<boolean> | Observable<b
|
|
|
107
117
|
*/
|
|
108
118
|
declare function usernameExistsValidator(userExists: TheSeamUserExistsFn): AsyncValidatorFn;
|
|
109
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Rejects passwords that contain the word "password" (case-insensitive).
|
|
122
|
+
*/
|
|
123
|
+
declare function passwordContentValidator(control: AbstractControl): {
|
|
124
|
+
passwordContent: {
|
|
125
|
+
value: string;
|
|
126
|
+
};
|
|
127
|
+
} | null;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Requires at least one lowercase letter.
|
|
131
|
+
*/
|
|
132
|
+
declare function passwordLowercaseValidator(control: AbstractControl): {
|
|
133
|
+
passwordLowercase: {};
|
|
134
|
+
} | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Requires at least one uppercase letter.
|
|
138
|
+
*/
|
|
139
|
+
declare function passwordUppercaseValidator(control: AbstractControl): {
|
|
140
|
+
passwordUppercase: {};
|
|
141
|
+
} | null;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Requires at least one digit.
|
|
145
|
+
*/
|
|
146
|
+
declare function passwordNumberValidator(control: AbstractControl): {
|
|
147
|
+
passwordNumber: {};
|
|
148
|
+
} | null;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Requires at least one special character.
|
|
152
|
+
*/
|
|
153
|
+
declare function passwordSpecialCharValidator(control: AbstractControl): {
|
|
154
|
+
passwordSpecialChar: {};
|
|
155
|
+
} | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Requires password to meet a minimum length.
|
|
159
|
+
*/
|
|
160
|
+
declare function passwordLengthValidator(config?: Partial<TheSeamPasswordFieldConfig>): ValidatorFn;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Group-level validator that checks password1 and password2 controls match.
|
|
164
|
+
*/
|
|
165
|
+
declare function passwordMatchValidator(g: AbstractControl): {
|
|
166
|
+
passwordMatch: boolean;
|
|
167
|
+
} | null;
|
|
168
|
+
|
|
110
169
|
declare function getAddress1Validators(config?: Partial<TheSeamAddressFieldConfig>, overrides?: TheSeamValidatorOverrides): TheSeamControlValidators;
|
|
111
170
|
|
|
112
171
|
declare function getAddress2Validators(config?: Partial<TheSeamAddressFieldConfig>, overrides?: TheSeamValidatorOverrides): TheSeamControlValidators;
|
|
@@ -121,6 +180,8 @@ declare function getZipValidators(countryControlOrPath?: AbstractControl | strin
|
|
|
121
180
|
|
|
122
181
|
declare function getUsernameValidators(userExists: TheSeamUserExistsFn, config?: Partial<TheSeamUsernameFieldConfig>, overrides?: TheSeamValidatorOverrides): TheSeamControlValidators;
|
|
123
182
|
|
|
183
|
+
declare function getPasswordValidators(config?: Partial<TheSeamPasswordFieldConfig>, overrides?: TheSeamValidatorOverrides): TheSeamControlValidators;
|
|
184
|
+
|
|
124
185
|
declare function createAddress1Control(formState?: string | null, config?: Partial<TheSeamAddressFieldConfig>, overrides?: TheSeamValidatorOverrides): FormControl<string | null>;
|
|
125
186
|
|
|
126
187
|
declare function createAddress2Control(formState?: string | null, config?: Partial<TheSeamAddressFieldConfig>, overrides?: TheSeamValidatorOverrides): FormControl<string | null>;
|
|
@@ -135,8 +196,51 @@ declare function createZipControl(formState?: string | null): FormControl<string
|
|
|
135
196
|
|
|
136
197
|
declare function createUsernameControl(formState: string | null | undefined, userExists: TheSeamUserExistsFn, config?: Partial<TheSeamUsernameFieldConfig>, overrides?: TheSeamValidatorOverrides): FormControl<string | null>;
|
|
137
198
|
|
|
199
|
+
interface TheSeamPasswordValidatorItem {
|
|
200
|
+
validatorName: string;
|
|
201
|
+
message: string;
|
|
202
|
+
/**
|
|
203
|
+
* Which control the validator lives on.
|
|
204
|
+
* - 'field': checks password1 control (default for most validators)
|
|
205
|
+
* - 'group': checks the FormGroup itself (for passwordMatch)
|
|
206
|
+
*/
|
|
207
|
+
target?: 'field' | 'group';
|
|
208
|
+
}
|
|
209
|
+
interface TheSeamPasswordValidatorRecord {
|
|
210
|
+
_id: string;
|
|
211
|
+
message: string;
|
|
212
|
+
icon?: SeamIcon;
|
|
213
|
+
iconClass?: string;
|
|
214
|
+
}
|
|
215
|
+
declare class TheSeamPasswordValidatorsListComponent implements DoCheck {
|
|
216
|
+
private readonly _successIcon;
|
|
217
|
+
private readonly _errorIcon;
|
|
218
|
+
fieldOneName: string;
|
|
219
|
+
fieldTwoName: string;
|
|
220
|
+
/**
|
|
221
|
+
* Override the default validator list. Each item specifies a validatorName,
|
|
222
|
+
* display message, and optionally whether the error is on the field or group.
|
|
223
|
+
*/
|
|
224
|
+
validators: TheSeamPasswordValidatorItem[];
|
|
225
|
+
get control(): AbstractControl | undefined;
|
|
226
|
+
set control(value: AbstractControl | undefined);
|
|
227
|
+
readonly _controlSubject: BehaviorSubject<AbstractControl<any, any, any> | undefined>;
|
|
228
|
+
readonly _touched: BehaviorSubject<boolean>;
|
|
229
|
+
readonly _records$: Observable<TheSeamPasswordValidatorRecord[]>;
|
|
230
|
+
ngDoCheck(): void;
|
|
231
|
+
private _getField;
|
|
232
|
+
private _createRecordsObservable;
|
|
233
|
+
private _buildRecords;
|
|
234
|
+
_trackBy(_index: number, item: TheSeamPasswordValidatorRecord): string;
|
|
235
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamPasswordValidatorsListComponent, never>;
|
|
236
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamPasswordValidatorsListComponent, "seam-password-validators-list", never, { "fieldOneName": { "alias": "fieldOneName"; "required": false; }; "fieldTwoName": { "alias": "fieldTwoName"; "required": false; }; "validators": { "alias": "validators"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
237
|
+
}
|
|
238
|
+
|
|
138
239
|
declare function createAddressFormGroup<T extends TheSeamAddressFormGroupOptions>(options: T): TheSeamAddressFormGroupResult<T>;
|
|
139
240
|
|
|
241
|
+
type TheSeamPasswordFormControls = Record<keyof TheSeamPasswordFormValue, FormControl<string | null>>;
|
|
242
|
+
declare function createPasswordFormGroup(config?: Partial<TheSeamPasswordFieldConfig>): FormGroup<TheSeamPasswordFormControls>;
|
|
243
|
+
|
|
140
244
|
declare class BaseLayoutContentFooterDirective implements HasElementRef {
|
|
141
245
|
readonly _elementRef: ElementRef<any>;
|
|
142
246
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseLayoutContentFooterDirective, never>;
|
|
@@ -1570,5 +1674,5 @@ declare class SeamRouteShellComponent {
|
|
|
1570
1674
|
static ɵcmp: i0.ɵɵComponentDeclaration<SeamRouteShellComponent, "seam-route-shell", never, {}, {}, never, never, true, never>;
|
|
1571
1675
|
}
|
|
1572
1676
|
|
|
1573
|
-
export { BaseLayoutContentDirective, BaseLayoutContentFooterDirective, BaseLayoutContentHeaderDirective, BaseLayoutSideBarDirective, BaseLayoutSideBarFooterDirective, BaseLayoutSideBarHeaderDirective, BaseLayoutTopBarDirective, DEFAULT_ADDRESS_FIELD_CONFIG, DEFAULT_SIDE_NAV_CONFIG, DEFAULT_USERNAME_FIELD_CONFIG, DashboardComponent, DashboardWidgetContainerComponent, DashboardWidgetPortalOutletDirective, DashboardWidgetTemplateContainerComponent, DashboardWidgetsComponent, DashboardWidgetsPreferencesService, DashboardWidgetsService, HierarchyLevelResolver, HierarchyRouterOutletComponent, HorizontalNavComponent, NavItemComponent, SeamRouteShellComponent, SideNavComponent, SideNavItemComponent, SideNavToggleComponent, THESEAM_BASE_LAYOUT_REF, THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR, THESEAM_SCHEMA_FRAMEWORK_OVERRIDES, THESEAM_SIDE_NAV_ACCESSOR, THESEAM_SIDE_NAV_CONFIG, THE_SEAM_BASE_LAYOUT, TheSeamBaseLayoutComponent, TheSeamBaseLayoutModule, TheSeamBaseLayoutNavToggleDirective, TheSeamDashboardModule, TheSeamDynamicRouterModule, TheSeamFramework, TheSeamNavModule, TheSeamSchemaFormFrameworkComponent, TheSeamSchemaFormModule, TheSeamSideNavModule, TheSeamTopBarComponent, TheSeamTopBarModule, TopBarCompactMenuBtnDetailDirective, TopBarItemDirective, TopBarMenuBtnDetailDirective, TopBarMenuButtonComponent, TopBarMenuDirective, TopBarNavToggleBtnDetailDirective, TopBarTitleComponent, applyItemConfig, areSameHorizontalNavItem, canBeActive, canExpand, canHaveChildren, computeDirection, createAddress1Control, createAddress2Control, createAddressFormGroup, createCityControl, createCountryControl, createStateControl, createUsernameControl, createZipControl, extendFramework, fader, findHorizontalNavLinkItems, findLinkItems, getAddress1Validators, getAddress2Validators, getCityValidators, getCountryValidators, getHorizontalNavItemStateProp, getItemStateProp, getStateValidators, getUrlSegments, getUsernameValidators, getZipValidators, hasActiveChild, hasChildren, hasExpandedChild, horizontalNavItemCanBeActive, horizontalNavItemCanExpand, horizontalNavItemCanHaveChildren, horizontalNavItemHasActiveChild, horizontalNavItemHasChildren, horizontalNavItemHasExpandedChild, ifUSA, isCountryUSA, isExpanded, isHorizontalNavItemActive, isHorizontalNavItemExpanded, isHorizontalNavItemFocused, isHorizontalNavItemType, isNavItemActive, isNavItemType, routeChanges, seamRouteTransition, setDefaultHorizontalNavItemState, setDefaultState, setHorizontalNavItemStateProp, setItemStateProp, sideNavExpandStateChangeFn, sideToSide, slider, stateProvinceRegionValidator, stepper, transformer, usernameExistsValidator };
|
|
1574
|
-
export type { IDashboardWidgetItemLayout, IDashboardWidgetItemLayoutPreference, IDashboardWidgetsColumnRecord, IDashboardWidgetsItem, IDashboardWidgetsItemDef, IDashboardWidgetsItemSerialized, IDashboardWidgetsPreferences, IDashboardWidgetsPreferencesMapRecord, IDynamicRouteDef, INavBadge, INavBasic, INavButton, INavDivider, INavItem, INavItemBase, INavItemState, INavLink, INavTitle, ISideNavBadge, ISideNavBasic, ISideNavButton, ISideNavDivider, ISideNavItem, ISideNavItemBase, ISideNavItemState, ISideNavLink, ISideNavTitle, ITheSeamDashboardWidgetsPreferencesAccessor, NavItemBadgeTooltip, NavItemCanHaveChildren, NavItemCanHaveState, NavItemChildAction, NavItemExpandAction, NavItemExpandedEvent, NavItemStateChanged, RouteDirection, SideNavAccessor, SideNavConfig, SideNavItemBadgeTooltip, SideNavItemCanBeActive, SideNavItemCanHaveChildren, SideNavItemCanHaveState, SideNavItemMenuItemTooltipBehavior, SideNavItemMenuItemTooltipConfig, SideNavItemStateChanged, TheSeamAddressFieldConfig, TheSeamAddressFormControls, TheSeamAddressFormGroupOptions, TheSeamAddressFormGroupResult, TheSeamAddressFormValue, TheSeamBaseLayoutAction, TheSeamBaseLayoutActionBase, TheSeamBaseLayoutActionButton, TheSeamBaseLayoutActionHref, TheSeamBaseLayoutActionRouterLink, TheSeamBaseLayoutActionTemplate, TheSeamBaseLayoutNav, TheSeamBaseLayoutRef, TheSeamControlValidators, TheSeamCreateCountryControlOptions, TheSeamSchemaFormControlWidget, TheSeamSchemaFormFrameworkOverrides, TheSeamSchemaFormWidget, TheSeamSchemaFormWidgetLayoutNodeOptions, TheSeamUserExistsFn, TheSeamUsernameFieldConfig, TheSeamValidatorOverrides, TopBarPosition };
|
|
1677
|
+
export { BaseLayoutContentDirective, BaseLayoutContentFooterDirective, BaseLayoutContentHeaderDirective, BaseLayoutSideBarDirective, BaseLayoutSideBarFooterDirective, BaseLayoutSideBarHeaderDirective, BaseLayoutTopBarDirective, DEFAULT_ADDRESS_FIELD_CONFIG, DEFAULT_PASSWORD_FIELD_CONFIG, DEFAULT_SIDE_NAV_CONFIG, DEFAULT_USERNAME_FIELD_CONFIG, DashboardComponent, DashboardWidgetContainerComponent, DashboardWidgetPortalOutletDirective, DashboardWidgetTemplateContainerComponent, DashboardWidgetsComponent, DashboardWidgetsPreferencesService, DashboardWidgetsService, HierarchyLevelResolver, HierarchyRouterOutletComponent, HorizontalNavComponent, NavItemComponent, SeamRouteShellComponent, SideNavComponent, SideNavItemComponent, SideNavToggleComponent, THESEAM_BASE_LAYOUT_REF, THESEAM_DASHBOARD_WIDGETS_PREFERENCES_ACCESSOR, THESEAM_SCHEMA_FRAMEWORK_OVERRIDES, THESEAM_SIDE_NAV_ACCESSOR, THESEAM_SIDE_NAV_CONFIG, THE_SEAM_BASE_LAYOUT, TheSeamBaseLayoutComponent, TheSeamBaseLayoutModule, TheSeamBaseLayoutNavToggleDirective, TheSeamDashboardModule, TheSeamDynamicRouterModule, TheSeamFramework, TheSeamNavModule, TheSeamPasswordValidatorsListComponent, TheSeamSchemaFormFrameworkComponent, TheSeamSchemaFormModule, TheSeamSideNavModule, TheSeamTopBarComponent, TheSeamTopBarModule, TopBarCompactMenuBtnDetailDirective, TopBarItemDirective, TopBarMenuBtnDetailDirective, TopBarMenuButtonComponent, TopBarMenuDirective, TopBarNavToggleBtnDetailDirective, TopBarTitleComponent, applyItemConfig, areSameHorizontalNavItem, canBeActive, canExpand, canHaveChildren, computeDirection, createAddress1Control, createAddress2Control, createAddressFormGroup, createCityControl, createCountryControl, createPasswordFormGroup, createStateControl, createUsernameControl, createZipControl, extendFramework, fader, findHorizontalNavLinkItems, findLinkItems, getAddress1Validators, getAddress2Validators, getCityValidators, getCountryValidators, getHorizontalNavItemStateProp, getItemStateProp, getPasswordValidators, getStateValidators, getUrlSegments, getUsernameValidators, getZipValidators, hasActiveChild, hasChildren, hasExpandedChild, horizontalNavItemCanBeActive, horizontalNavItemCanExpand, horizontalNavItemCanHaveChildren, horizontalNavItemHasActiveChild, horizontalNavItemHasChildren, horizontalNavItemHasExpandedChild, ifUSA, isCountryUSA, isExpanded, isHorizontalNavItemActive, isHorizontalNavItemExpanded, isHorizontalNavItemFocused, isHorizontalNavItemType, isNavItemActive, isNavItemType, passwordContentValidator, passwordLengthValidator, passwordLowercaseValidator, passwordMatchValidator, passwordNumberValidator, passwordSpecialCharValidator, passwordUppercaseValidator, routeChanges, seamRouteTransition, setDefaultHorizontalNavItemState, setDefaultState, setHorizontalNavItemStateProp, setItemStateProp, sideNavExpandStateChangeFn, sideToSide, slider, stateProvinceRegionValidator, stepper, transformer, usernameExistsValidator };
|
|
1678
|
+
export type { IDashboardWidgetItemLayout, IDashboardWidgetItemLayoutPreference, IDashboardWidgetsColumnRecord, IDashboardWidgetsItem, IDashboardWidgetsItemDef, IDashboardWidgetsItemSerialized, IDashboardWidgetsPreferences, IDashboardWidgetsPreferencesMapRecord, IDynamicRouteDef, INavBadge, INavBasic, INavButton, INavDivider, INavItem, INavItemBase, INavItemState, INavLink, INavTitle, ISideNavBadge, ISideNavBasic, ISideNavButton, ISideNavDivider, ISideNavItem, ISideNavItemBase, ISideNavItemState, ISideNavLink, ISideNavTitle, ITheSeamDashboardWidgetsPreferencesAccessor, NavItemBadgeTooltip, NavItemCanHaveChildren, NavItemCanHaveState, NavItemChildAction, NavItemExpandAction, NavItemExpandedEvent, NavItemStateChanged, RouteDirection, SideNavAccessor, SideNavConfig, SideNavItemBadgeTooltip, SideNavItemCanBeActive, SideNavItemCanHaveChildren, SideNavItemCanHaveState, SideNavItemMenuItemTooltipBehavior, SideNavItemMenuItemTooltipConfig, SideNavItemStateChanged, TheSeamAddressFieldConfig, TheSeamAddressFormControls, TheSeamAddressFormGroupOptions, TheSeamAddressFormGroupResult, TheSeamAddressFormValue, TheSeamBaseLayoutAction, TheSeamBaseLayoutActionBase, TheSeamBaseLayoutActionButton, TheSeamBaseLayoutActionHref, TheSeamBaseLayoutActionRouterLink, TheSeamBaseLayoutActionTemplate, TheSeamBaseLayoutNav, TheSeamBaseLayoutRef, TheSeamControlValidators, TheSeamCreateCountryControlOptions, TheSeamPasswordFieldConfig, TheSeamPasswordFormControls, TheSeamPasswordFormValue, TheSeamPasswordValidatorItem, TheSeamPasswordValidatorRecord, TheSeamSchemaFormControlWidget, TheSeamSchemaFormFrameworkOverrides, TheSeamSchemaFormWidget, TheSeamSchemaFormWidgetLayoutNodeOptions, TheSeamUserExistsFn, TheSeamUsernameFieldConfig, TheSeamValidatorOverrides, TopBarPosition };
|