valtech-components 2.0.733 → 2.0.735
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/esm2022/lib/components/molecules/username-input/username-input.component.mjs +32 -9
- package/esm2022/lib/components/organisms/form/form.component.mjs +37 -5
- package/esm2022/lib/components/types.mjs +2 -1
- package/esm2022/lib/services/auth/auth.service.mjs +13 -5
- package/esm2022/lib/services/legal-link/legal-link.service.mjs +22 -5
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +10360 -10281
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/molecules/username-input/username-input.component.d.ts +13 -0
- package/lib/components/organisms/form/form.component.d.ts +8 -0
- package/lib/components/types.d.ts +2 -1
- package/lib/services/auth/auth.service.d.ts +2 -0
- package/lib/services/legal-link/legal-link.service.d.ts +17 -3
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export declare class RightsFooterComponent {
|
|
|
43
43
|
/**
|
|
44
44
|
* Computed helper for color prop in template.
|
|
45
45
|
*/
|
|
46
|
-
propsColor: import("@angular/core").Signal<"
|
|
46
|
+
propsColor: import("@angular/core").Signal<"medium" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "dark">;
|
|
47
47
|
/**
|
|
48
48
|
* Computed helper for withMargin prop in template.
|
|
49
49
|
*/
|
|
@@ -23,6 +23,12 @@ import * as i0 from "@angular/core";
|
|
|
23
23
|
*/
|
|
24
24
|
export declare class UsernameInputComponent implements OnInit, OnDestroy {
|
|
25
25
|
props: UsernameInputMetadata;
|
|
26
|
+
/**
|
|
27
|
+
* AuthService optional — si está inyectado y `props.checkAvailability` no se provee,
|
|
28
|
+
* el component cae automáticamente a `AuthService.checkHandleAvailability` (backend
|
|
29
|
+
* de Valtech). Consumers que quieran otro endpoint pasan su propio callback.
|
|
30
|
+
*/
|
|
31
|
+
private authService;
|
|
26
32
|
private destroy$;
|
|
27
33
|
private checkAvailability$;
|
|
28
34
|
isFocused: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -37,6 +43,13 @@ export declare class UsernameInputComponent implements OnInit, OnDestroy {
|
|
|
37
43
|
onFocus(): void;
|
|
38
44
|
onBlur(): void;
|
|
39
45
|
onInput(event: CustomEvent): void;
|
|
46
|
+
/**
|
|
47
|
+
* Resolve la fn de check de disponibilidad:
|
|
48
|
+
* 1. Si el caller pasa `props.checkAvailability` → usar esa
|
|
49
|
+
* 2. Si AuthService está inyectado → caer a `checkHandleAvailability` (backend Valtech)
|
|
50
|
+
* 3. Sino → undefined (no se muestra status indicator)
|
|
51
|
+
*/
|
|
52
|
+
private resolveCheckFn;
|
|
40
53
|
private setupAvailabilityCheck;
|
|
41
54
|
private normalizeUsername;
|
|
42
55
|
private isValidFormat;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DoCheck, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { UsernameInputMetadata } from '../../molecules/username-input/types';
|
|
3
4
|
import { ButtonMetadata, FormMetadata, FormSubmit, InputMetadata, InputType } from '../../types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
@@ -34,6 +35,13 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
34
35
|
submitHandler(token?: string): Promise<void>;
|
|
35
36
|
getControl(field: string): FormControl;
|
|
36
37
|
getFieldProp(field: InputMetadata): InputMetadata;
|
|
38
|
+
/**
|
|
39
|
+
* Adapter — convierte un `InputMetadata` (con type=HANDLE) a `UsernameInputMetadata`.
|
|
40
|
+
* El check de disponibilidad se resuelve dentro del component (AuthService inyectado);
|
|
41
|
+
* el caller puede sobrescribirlo pasando `field.errors` o un `UsernameInputMetadata`
|
|
42
|
+
* custom usando type=TEXT si necesita otra fuente de truth.
|
|
43
|
+
*/
|
|
44
|
+
getUsernameProp(field: InputMetadata): UsernameInputMetadata;
|
|
37
45
|
get isAtEndOfForm(): boolean;
|
|
38
46
|
get Form(): FormGroup;
|
|
39
47
|
get FormState(): {
|
|
@@ -336,6 +336,8 @@ export declare class AuthService implements OnDestroy {
|
|
|
336
336
|
*/
|
|
337
337
|
checkHandleAvailability(handle: string): Observable<CheckHandleResponse>;
|
|
338
338
|
private get baseUrl();
|
|
339
|
+
/** Base for /v2/users endpoints (separate from /v2/auth). */
|
|
340
|
+
private get usersBaseUrl();
|
|
339
341
|
private handleSuccessfulAuth;
|
|
340
342
|
private clearState;
|
|
341
343
|
private startRefreshTimer;
|
|
@@ -34,12 +34,26 @@ export declare class LegalLinkService {
|
|
|
34
34
|
get openInNewTab(): boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Returns the URL to use for a given internal path. Absolute URLs pass through.
|
|
37
|
+
*
|
|
38
|
+
* When `locale` is provided AND the resolved URL would be cross-origin, appends
|
|
39
|
+
* `?lang={locale}` so the main site can render the legal doc in the user's
|
|
40
|
+
* active language (instead of its default). Locale is omitted for same-origin
|
|
41
|
+
* resolves since the main site reads locale from its own `LocaleService`.
|
|
42
|
+
*
|
|
37
43
|
* @example
|
|
38
|
-
* resolve('/legal/terms')
|
|
39
|
-
*
|
|
44
|
+
* resolve('/legal/terms')
|
|
45
|
+
* // main site: '/legal/terms'
|
|
46
|
+
* // satellite: 'https://myvaltech.com/legal/terms'
|
|
47
|
+
*
|
|
48
|
+
* resolve('/legal/terms', { locale: 'pt' })
|
|
49
|
+
* // main site: '/legal/terms' (locale stays implicit)
|
|
50
|
+
* // satellite: 'https://myvaltech.com/legal/terms?lang=pt'
|
|
51
|
+
*
|
|
40
52
|
* resolve('https://x.com/y') // unchanged
|
|
41
53
|
*/
|
|
42
|
-
resolve(path: string
|
|
54
|
+
resolve(path: string, options?: {
|
|
55
|
+
locale?: string;
|
|
56
|
+
}): string;
|
|
43
57
|
/** `true` if the path would be resolved to a cross-origin URL. */
|
|
44
58
|
isExternal(path: string): boolean;
|
|
45
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<LegalLinkService, never>;
|
package/lib/version.d.ts
CHANGED