valtech-components 2.0.751 → 2.0.753
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 +3 -3
- package/esm2022/lib/components/organisms/form/form.component.mjs +10 -4
- package/esm2022/lib/services/firebase/messaging.service.mjs +27 -10
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +38 -15
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +1 -1
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@ import 'prismjs/components/prism-json';
|
|
|
51
51
|
* Current version of valtech-components.
|
|
52
52
|
* This is automatically updated during the publish process.
|
|
53
53
|
*/
|
|
54
|
-
const VERSION = '2.0.
|
|
54
|
+
const VERSION = '2.0.753';
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Servicio para gestionar presets de componentes.
|
|
@@ -21757,17 +21757,34 @@ class MessagingService {
|
|
|
21757
21757
|
console.warn('[Messaging] FCM not supported in this browser');
|
|
21758
21758
|
return null;
|
|
21759
21759
|
}
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21760
|
+
// Retry loop: AngularFire `provideMessaging` registra un APP_INITIALIZER
|
|
21761
|
+
// que internamente resuelve `isSupported()`. Si `injector.get(Messaging)`
|
|
21762
|
+
// se llama antes que ese APP_INITIALIZER termine, lanza. Esto pasa cuando
|
|
21763
|
+
// OTROS APP_INITIALIZER (ej. HandoffService) construyen AuthService durante
|
|
21764
|
+
// bootstrap → AuthService injecta MessagingService → MessagingService toca
|
|
21765
|
+
// Messaging temprano. `await fcmIsSupported()` no espera al APP_INITIALIZER
|
|
21766
|
+
// de AngularFire — el único workaround es reintentar hasta que resuelva.
|
|
21767
|
+
const MAX_RETRIES = 30;
|
|
21768
|
+
const DELAY_MS = 100;
|
|
21769
|
+
for (let i = 0; i < MAX_RETRIES; i++) {
|
|
21770
|
+
try {
|
|
21771
|
+
const instance = this.injector.get(Messaging, null);
|
|
21772
|
+
if (!instance) {
|
|
21773
|
+
// Provider no registrado (enableMessaging: false). No reintentar.
|
|
21774
|
+
console.warn('[Messaging] Messaging not provided. Verify provideValtechFirebase({ enableMessaging: true }).');
|
|
21775
|
+
return null;
|
|
21776
|
+
}
|
|
21777
|
+
return instance;
|
|
21778
|
+
}
|
|
21779
|
+
catch (err) {
|
|
21780
|
+
if (i === MAX_RETRIES - 1) {
|
|
21781
|
+
console.error('[Messaging] AngularFire APP_INITIALIZER never resolved after', MAX_RETRIES * DELAY_MS, 'ms:', err);
|
|
21782
|
+
return null;
|
|
21783
|
+
}
|
|
21784
|
+
await new Promise(r => setTimeout(r, DELAY_MS));
|
|
21764
21785
|
}
|
|
21765
|
-
return instance;
|
|
21766
|
-
}
|
|
21767
|
-
catch (err) {
|
|
21768
|
-
console.error('[Messaging] injector.get(Messaging) threw:', err);
|
|
21769
|
-
return null;
|
|
21770
21786
|
}
|
|
21787
|
+
return null;
|
|
21771
21788
|
}
|
|
21772
21789
|
// ===========================================================================
|
|
21773
21790
|
// INICIALIZACIÓN
|
|
@@ -24427,7 +24444,7 @@ class UsernameInputComponent {
|
|
|
24427
24444
|
</ion-text>
|
|
24428
24445
|
}
|
|
24429
24446
|
</div>
|
|
24430
|
-
`, isInline: true, styles: [".username-input-container{margin-bottom:1rem}.username-label{display:block;font-size:.875rem;font-weight:
|
|
24447
|
+
`, isInline: true, styles: [".username-input-container{margin-bottom:1rem}.username-label{display:block;font-size:.875rem;font-weight:700;color:var(--ion-color-dark);margin-bottom:.5rem}.username-prefix{font-size:1rem;font-weight:500;color:var(--ion-color-medium);-webkit-user-select:none;user-select:none;margin-inline-end:.25rem;display:inline-flex;align-items:center}.username-field{width:100%}.username-field.has-error{--highlight-color: var(--ion-color-danger)}.availability-indicator{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:.5rem}.checking-spinner{width:18px;height:18px;--color: var(--ion-color-medium)}.status-icon{font-size:1.25rem}.status-icon.available{color:var(--ion-color-success)}.status-icon.taken{color:var(--ion-color-danger)}.status-icon.invalid{color:var(--ion-color-warning)}.status-message,.error-message{display:block;margin-top:.25rem;padding-left:.25rem}:host-context(body.dark){.username-input-wrapper{background:var(--ion-color-step-50);border-color:var(--ion-color-step-150)}.username-label{color:var(--ion-color-light)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }] }); }
|
|
24431
24448
|
}
|
|
24432
24449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UsernameInputComponent, decorators: [{
|
|
24433
24450
|
type: Component,
|
|
@@ -24483,7 +24500,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
24483
24500
|
</ion-text>
|
|
24484
24501
|
}
|
|
24485
24502
|
</div>
|
|
24486
|
-
`, styles: [".username-input-container{margin-bottom:1rem}.username-label{display:block;font-size:.875rem;font-weight:
|
|
24503
|
+
`, styles: [".username-input-container{margin-bottom:1rem}.username-label{display:block;font-size:.875rem;font-weight:700;color:var(--ion-color-dark);margin-bottom:.5rem}.username-prefix{font-size:1rem;font-weight:500;color:var(--ion-color-medium);-webkit-user-select:none;user-select:none;margin-inline-end:.25rem;display:inline-flex;align-items:center}.username-field{width:100%}.username-field.has-error{--highlight-color: var(--ion-color-danger)}.availability-indicator{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:.5rem}.checking-spinner{width:18px;height:18px;--color: var(--ion-color-medium)}.status-icon{font-size:1.25rem}.status-icon.available{color:var(--ion-color-success)}.status-icon.taken{color:var(--ion-color-danger)}.status-icon.invalid{color:var(--ion-color-warning)}.status-message,.error-message{display:block;margin-top:.25rem;padding-left:.25rem}:host-context(body.dark){.username-input-wrapper{background:var(--ion-color-step-50);border-color:var(--ion-color-step-150)}.username-label{color:var(--ion-color-light)}}\n"] }]
|
|
24487
24504
|
}], propDecorators: { props: [{
|
|
24488
24505
|
type: Input
|
|
24489
24506
|
}] } });
|
|
@@ -26103,13 +26120,19 @@ class FormComponent {
|
|
|
26103
26120
|
const formControls = {};
|
|
26104
26121
|
this.props.sections.forEach(section => {
|
|
26105
26122
|
section.fields.forEach(field => {
|
|
26123
|
+
// Honra `field.value` al construir el FormGroup para que controles tipo
|
|
26124
|
+
// HANDLE (que consumen el control directo via [formControl]) reciban el
|
|
26125
|
+
// valor inicial sin que el caller tenga que patchValue post-mount.
|
|
26126
|
+
// El helper applyDefaultValueToControl (val-text-input etc.) sigue
|
|
26127
|
+
// funcionando — escribe sobre un control ya inicializado, idempotente.
|
|
26128
|
+
const initialValue = field.value ?? null;
|
|
26106
26129
|
if (field.type === this.types.NUMBER_FROM_TO) {
|
|
26107
26130
|
// Crear dos controles para campos NUMBER_FROM_TO
|
|
26108
|
-
formControls[`${field.name}_from`] = [
|
|
26109
|
-
formControls[`${field.name}_to`] = [
|
|
26131
|
+
formControls[`${field.name}_from`] = [initialValue, field.validators || []];
|
|
26132
|
+
formControls[`${field.name}_to`] = [initialValue, field.validators || []];
|
|
26110
26133
|
}
|
|
26111
26134
|
else {
|
|
26112
|
-
formControls[field.name] = [
|
|
26135
|
+
formControls[field.name] = [initialValue, field.validators || []];
|
|
26113
26136
|
}
|
|
26114
26137
|
});
|
|
26115
26138
|
});
|