@solcre-org/core-ui 2.22.0 → 2.23.0
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.
|
@@ -1128,7 +1128,7 @@
|
|
|
1128
1128
|
"success": "Access validated successfully."
|
|
1129
1129
|
},
|
|
1130
1130
|
"errors": {
|
|
1131
|
-
"
|
|
1131
|
+
"missingToken": "The secure validation token was not found in the URL.",
|
|
1132
1132
|
"validation": "An error occurred while validating secure access."
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
@@ -1132,7 +1132,7 @@
|
|
|
1132
1132
|
"success": "Acceso validado correctamente."
|
|
1133
1133
|
},
|
|
1134
1134
|
"errors": {
|
|
1135
|
-
"
|
|
1135
|
+
"missingToken": "No se encontró el token de validación en la URL.",
|
|
1136
1136
|
"validation": "Ocurrió un error al validar el acceso seguro."
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
@@ -17766,11 +17766,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
17766
17766
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
17767
17767
|
// No edites manualmente este archivo
|
|
17768
17768
|
const VERSION = {
|
|
17769
|
-
full: '2.
|
|
17769
|
+
full: '2.23.0',
|
|
17770
17770
|
major: 2,
|
|
17771
|
-
minor:
|
|
17771
|
+
minor: 23,
|
|
17772
17772
|
patch: 0,
|
|
17773
|
-
timestamp: '2026-03-
|
|
17773
|
+
timestamp: '2026-03-26T19:43:25.143Z',
|
|
17774
17774
|
buildDate: '26/3/2026'
|
|
17775
17775
|
};
|
|
17776
17776
|
|
|
@@ -22083,16 +22083,17 @@ class SecureAuth {
|
|
|
22083
22083
|
loaderService = inject(LoaderService);
|
|
22084
22084
|
screenStatus = SECURE_AUTH_SCREEN_STATUS;
|
|
22085
22085
|
validationEndpoint = input('/api/auth/validate-secure-token');
|
|
22086
|
+
queryParamName = input('token');
|
|
22086
22087
|
validationEvent = output();
|
|
22087
22088
|
loaderRequestID = 'secure-auth-loader';
|
|
22088
22089
|
status = signal(SECURE_AUTH_SCREEN_STATUS.IDLE);
|
|
22089
22090
|
errorMessageKey = signal(null);
|
|
22090
22091
|
ngOnInit() {
|
|
22091
|
-
const
|
|
22092
|
-
if (!
|
|
22093
|
-
const error = new Error('Secure auth
|
|
22092
|
+
const token = this.getTokenFromUrl();
|
|
22093
|
+
if (!token) {
|
|
22094
|
+
const error = new Error('Secure auth token was not found in the URL.');
|
|
22094
22095
|
this.status.set(SECURE_AUTH_SCREEN_STATUS.ERROR);
|
|
22095
|
-
this.errorMessageKey.set('secureAuth.errors.
|
|
22096
|
+
this.errorMessageKey.set('secureAuth.errors.missingToken');
|
|
22096
22097
|
this.validationEvent.emit({
|
|
22097
22098
|
type: SECURE_AUTH_VALIDATION_EVENT_TYPE.ERROR,
|
|
22098
22099
|
error
|
|
@@ -22102,7 +22103,7 @@ class SecureAuth {
|
|
|
22102
22103
|
this.status.set(SECURE_AUTH_SCREEN_STATUS.LOADING);
|
|
22103
22104
|
this.errorMessageKey.set(null);
|
|
22104
22105
|
this.loaderService.showLoader(this.loaderRequestID);
|
|
22105
|
-
this.apiService.createObj(this.validationEndpoint(), {
|
|
22106
|
+
this.apiService.createObj(this.validationEndpoint(), { token }, false)
|
|
22106
22107
|
.pipe(switchMap((response) => {
|
|
22107
22108
|
const responseData = this.getResponseData(response);
|
|
22108
22109
|
const authToken = this.buildAuthToken(responseData);
|
|
@@ -22120,7 +22121,7 @@ class SecureAuth {
|
|
|
22120
22121
|
this.status.set(SECURE_AUTH_SCREEN_STATUS.SUCCESS);
|
|
22121
22122
|
this.validationEvent.emit({
|
|
22122
22123
|
type: SECURE_AUTH_VALIDATION_EVENT_TYPE.SUCCESS,
|
|
22123
|
-
|
|
22124
|
+
token,
|
|
22124
22125
|
response,
|
|
22125
22126
|
user
|
|
22126
22127
|
});
|
|
@@ -22130,14 +22131,15 @@ class SecureAuth {
|
|
|
22130
22131
|
this.errorMessageKey.set('secureAuth.errors.validation');
|
|
22131
22132
|
this.validationEvent.emit({
|
|
22132
22133
|
type: SECURE_AUTH_VALIDATION_EVENT_TYPE.ERROR,
|
|
22133
|
-
|
|
22134
|
+
token,
|
|
22134
22135
|
error
|
|
22135
22136
|
});
|
|
22136
22137
|
}
|
|
22137
22138
|
});
|
|
22138
22139
|
}
|
|
22139
|
-
|
|
22140
|
-
|
|
22140
|
+
getTokenFromUrl() {
|
|
22141
|
+
const queryParamName = this.queryParamName().trim() || 'token';
|
|
22142
|
+
return new URLSearchParams(window.location.search).get(queryParamName);
|
|
22141
22143
|
}
|
|
22142
22144
|
getResponseData(response) {
|
|
22143
22145
|
const responseData = this.getObjectValue(response?.data);
|
|
@@ -22236,7 +22238,7 @@ class SecureAuth {
|
|
|
22236
22238
|
return of(null);
|
|
22237
22239
|
}
|
|
22238
22240
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SecureAuth, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22239
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SecureAuth, isStandalone: true, selector: "core-secure-auth", inputs: { validationEndpoint: { classPropertyName: "validationEndpoint", publicName: "validationEndpoint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { validationEvent: "validationEvent" }, ngImport: i0, template: "<core-loader [requestId]=\"loaderRequestID\" />\n<div class=\"u-heading u-push-t--xl u-push-b\">\n @if (status() === screenStatus.LOADING) {\n <p>{{ 'secureAuth.status.loading' | translate }}</p>\n } @else if (status() === screenStatus.SUCCESS) {\n <p>{{ 'secureAuth.status.success' | translate }}</p>\n } @else if (status() === screenStatus.ERROR) {\n <p><span class=\"icon-error\"></span> {{ (errorMessageKey() ?? 'secureAuth.errors.validation') | translate }}</p>\n }\n</div>\n", dependencies: [{ kind: "component", type: LoaderComponent, selector: "core-loader", inputs: ["imageUrl", "requestId"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: SecureAuth, isStandalone: true, selector: "core-secure-auth", inputs: { validationEndpoint: { classPropertyName: "validationEndpoint", publicName: "validationEndpoint", isSignal: true, isRequired: false, transformFunction: null }, queryParamName: { classPropertyName: "queryParamName", publicName: "queryParamName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { validationEvent: "validationEvent" }, ngImport: i0, template: "<core-loader [requestId]=\"loaderRequestID\" />\n<div class=\"u-heading u-push-t--xl u-push-b\">\n @if (status() === screenStatus.LOADING) {\n <p>{{ 'secureAuth.status.loading' | translate }}</p>\n } @else if (status() === screenStatus.SUCCESS) {\n <p>{{ 'secureAuth.status.success' | translate }}</p>\n } @else if (status() === screenStatus.ERROR) {\n <p><span class=\"icon-error\"></span> {{ (errorMessageKey() ?? 'secureAuth.errors.validation') | translate }}</p>\n }\n</div>\n", dependencies: [{ kind: "component", type: LoaderComponent, selector: "core-loader", inputs: ["imageUrl", "requestId"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22240
22242
|
}
|
|
22241
22243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SecureAuth, decorators: [{
|
|
22242
22244
|
type: Component,
|