@eui/base 14.0.3 → 14.0.4-snapshot-1661163930913
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/assets/openid/openid-login.js +28 -4
- package/docs/classes/EuiService.html +3 -3
- package/docs/dependencies.html +40 -10
- package/docs/interfaces/EuiServiceModel.html +3 -3
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/functions.html +50 -689
- package/docs/miscellaneous/variables.html +305 -0
- package/esm2020/lib/eui-models/eui-config/i18n.config.mjs +8 -14
- package/esm2020/lib/eui-models/eui-config/locale.config.mjs +3 -3
- package/esm2020/lib/eui-models/eui-pagination/eui-pagination.model.mjs +4 -2
- package/esm2020/lib/eui-models/eui-service.model.mjs +1 -1
- package/esm2020/lib/eui-models/log/console.appender.mjs +3 -1
- package/esm2020/lib/eui-models/log/log.appender.mjs +2 -1
- package/esm2020/lib/eui-models/log/log.logger.mjs +11 -3
- package/esm2020/lib/eui-models/log/url.appender.mjs +2 -2
- package/esm2020/lib/util/coerce-decorator/coerce.mjs +2 -2
- package/esm2020/lib/util/coerce-decorator/coercions.mjs +2 -2
- package/esm2020/lib/util/merge.mjs +7 -9
- package/esm2020/lib/util/xhr.mjs +2 -1
- package/esm2020/lib/ux-models/ux-badge.model.mjs +1 -1
- package/esm2020/lib/ux-models/ux-error-feedback.model.mjs +4 -6
- package/esm2020/lib/ux-models/ux-eu-languages.model.mjs +8 -6
- package/esm2020/lib/ux-models/ux-link.model.mjs +1 -1
- package/fesm2015/eui-base.mjs +44 -38
- package/fesm2015/eui-base.mjs.map +1 -1
- package/fesm2020/eui-base.mjs +44 -38
- package/fesm2020/eui-base.mjs.map +1 -1
- package/lib/eui-models/eui-config/i18n.config.d.ts +6 -5
- package/lib/eui-models/eui-config/i18n.config.d.ts.map +1 -1
- package/lib/eui-models/eui-config/locale.config.d.ts +1 -1
- package/lib/eui-models/eui-config/locale.config.d.ts.map +1 -1
- package/lib/eui-models/eui-service.model.d.ts +2 -2
- package/lib/eui-models/log/console.appender.d.ts +2 -0
- package/lib/eui-models/log/console.appender.d.ts.map +1 -1
- package/lib/eui-models/log/log.appender.d.ts +2 -0
- package/lib/eui-models/log/log.appender.d.ts.map +1 -1
- package/lib/eui-models/log/log.logger.d.ts +10 -0
- package/lib/eui-models/log/log.logger.d.ts.map +1 -1
- package/lib/util/merge.d.ts +4 -3
- package/lib/util/merge.d.ts.map +1 -1
- package/lib/util/xhr.d.ts +1 -0
- package/lib/util/xhr.d.ts.map +1 -1
- package/lib/ux-models/ux-badge.model.d.ts +1 -1
- package/lib/ux-models/ux-error-feedback.model.d.ts +1 -1
- package/lib/ux-models/ux-error-feedback.model.d.ts.map +1 -1
- package/lib/ux-models/ux-eu-languages.model.d.ts +6 -0
- package/lib/ux-models/ux-eu-languages.model.d.ts.map +1 -1
- package/lib/ux-models/ux-link.model.d.ts +1 -1
- package/package.json +2 -2
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
SESSION_STORAGE_KEY_ORIGINAL_URL: "ux-openid-connect-original-url",
|
|
23
23
|
SESSION_STORAGE_KEY_PUBLIC_KEY: "ux-openid-connect-public-key",
|
|
24
24
|
SESSION_STORAGE_KEY_PRIVATE_KEY: "ux-openid-connect-private-key",
|
|
25
|
+
SESSION_STORAGE_KEY_LOGIN_TIMESTAMP: "ux-openid-connect-login-timestamp",
|
|
25
26
|
REQUEST_PARAMETER_DEVELOPMENT_URL: "ux-openid-connect-dev-url",
|
|
26
27
|
REQUEST_PARAMETER_DEVELOPMENT_PUBLIC_KEY: "ux-openid-connect-dev-public-key",
|
|
27
28
|
DEFAULT_OPENID_SCOPE: "openid email profile",
|
|
@@ -408,7 +409,7 @@
|
|
|
408
409
|
}
|
|
409
410
|
} else if (xhr.status >= 400) {
|
|
410
411
|
if (xhr.status === 403) {
|
|
411
|
-
// Not allowed to
|
|
412
|
+
// Not allowed to impersonate!
|
|
412
413
|
if (callbackFunction != null && (typeof callbackFunction) == "function") {
|
|
413
414
|
callbackFunction(false);
|
|
414
415
|
} else {
|
|
@@ -546,6 +547,18 @@
|
|
|
546
547
|
}
|
|
547
548
|
},
|
|
548
549
|
|
|
550
|
+
isApiGatewayTokenInvalidResponse: function (xhr) {
|
|
551
|
+
return xhr.responseText != null && xhr.responseText.indexOf("<ams:code>900901</ams:code>") >= 0;
|
|
552
|
+
},
|
|
553
|
+
|
|
554
|
+
isEuLoginInvalidIdTokenResponse: function (xhr, responseAsJson) {
|
|
555
|
+
return responseAsJson != null && responseAsJson.error == "invalid_request";
|
|
556
|
+
},
|
|
557
|
+
|
|
558
|
+
isEuAccessDeniedErrorResponse: function (xhr, responseAsJson) {
|
|
559
|
+
return responseAsJson != null && responseAsJson.error == "access_denied";
|
|
560
|
+
},
|
|
561
|
+
|
|
549
562
|
handleErrorResponse: function (xhr, errorCallbackFunction) {
|
|
550
563
|
if (xhr != null) {
|
|
551
564
|
var response = null;
|
|
@@ -553,7 +566,7 @@
|
|
|
553
566
|
response = JSON.parse(xhr.responseText);
|
|
554
567
|
} catch (error) {}
|
|
555
568
|
|
|
556
|
-
if (
|
|
569
|
+
if (OpenIdConnect.isEuLoginInvalidIdTokenResponse(xhr, response)) {
|
|
557
570
|
// The ID token is invalid or incorrect; retrieve another one:
|
|
558
571
|
OpenIdConnect.renewIdToken();
|
|
559
572
|
} else if (xhr.status === 401 || xhr.status === 403) {
|
|
@@ -562,8 +575,9 @@
|
|
|
562
575
|
// Either the developer needs to use a valid client ID or the administrator should allow the client ID access.
|
|
563
576
|
// * The API Gateway access token is invalid. (401)
|
|
564
577
|
// * The EU Login access token is invalid. (403)
|
|
565
|
-
|
|
566
|
-
|
|
578
|
+
// * EU Access is returning an error object with "access_denied" error. (403)
|
|
579
|
+
if (xhr.retry != null && (typeof xhr.retry == "function") && ! OpenIdConnect.isEuAccessDeniedErrorResponse(xhr, response)) {
|
|
580
|
+
xhr.retry(OpenIdConnect.isApiGatewayTokenInvalidResponse(xhr));
|
|
567
581
|
} else {
|
|
568
582
|
if ((typeof errorCallbackFunction) == "function") {
|
|
569
583
|
errorCallbackFunction(xhr);
|
|
@@ -834,6 +848,15 @@
|
|
|
834
848
|
// Check for errors first:
|
|
835
849
|
var search = window.top.location.search;
|
|
836
850
|
if (search.indexOf("?error=invalid_client") < 0 && search.indexOf("&error=invalid_client") < 0 && search.indexOf("?error=invalid_request") < 0 && search.indexOf("&error=invalid_request") < 0) {
|
|
851
|
+
// First check if we are not in a login loop:
|
|
852
|
+
var lastLoginAttempt = sessionStorage.getItem(OpenIdConnect.SESSION_STORAGE_KEY_LOGIN_TIMESTAMP);
|
|
853
|
+
var now = new Date().getTime();
|
|
854
|
+
if (lastLoginAttempt != null && (now - lastLoginAttempt) < 30000) {
|
|
855
|
+
throw "Login loop detected; 2 login attempts were made in less than half a minute.\nCheck the OpenID Connect configuration for errors.";
|
|
856
|
+
} else {
|
|
857
|
+
sessionStorage.setItem(OpenIdConnect.SESSION_STORAGE_KEY_LOGIN_TIMESTAMP, now);
|
|
858
|
+
}
|
|
859
|
+
|
|
837
860
|
sessionStorage.removeItem(OpenIdConnect.SESSION_STORAGE_KEY_ID_TOKEN);
|
|
838
861
|
// Also invalidate the API Gateway token because it can be used for authentication too:
|
|
839
862
|
OpenIdConnect.clearCachedApiGatewayAccessToken();
|
|
@@ -1142,6 +1165,7 @@
|
|
|
1142
1165
|
OpenIdConnect.SESSION_STORAGE_KEY_ORIGINAL_URL += applicationSuffix;
|
|
1143
1166
|
OpenIdConnect.SESSION_STORAGE_KEY_PUBLIC_KEY += applicationSuffix;
|
|
1144
1167
|
OpenIdConnect.SESSION_STORAGE_KEY_PRIVATE_KEY += applicationSuffix;
|
|
1168
|
+
OpenIdConnect.SESSION_STORAGE_KEY_LOGIN_TIMESTAMP += applicationSuffix;
|
|
1145
1169
|
}
|
|
1146
1170
|
}
|
|
1147
1171
|
};
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
<tr>
|
|
309
309
|
<td class="col-md-4">
|
|
310
310
|
<span class="modifier-icon icon ion-ios-reset"></span>
|
|
311
|
-
<code>getState(key?:
|
|
311
|
+
<code>getState(key?: A)</code>
|
|
312
312
|
</td>
|
|
313
313
|
</tr>
|
|
314
314
|
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
<td class="col-md-4">
|
|
319
319
|
<b>Type parameters :</b>
|
|
320
320
|
<ul class="type-parameters">
|
|
321
|
-
<li>
|
|
321
|
+
<li>A</li>
|
|
322
322
|
</ul>
|
|
323
323
|
</td>
|
|
324
324
|
</tr>
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
<tr>
|
|
342
342
|
<td>key</td>
|
|
343
343
|
<td>
|
|
344
|
-
<code>
|
|
344
|
+
<code>A</code>
|
|
345
345
|
</td>
|
|
346
346
|
|
|
347
347
|
<td>
|
package/docs/dependencies.html
CHANGED
|
@@ -86,8 +86,36 @@
|
|
|
86
86
|
<b>@angular/material</b> : 14.0.4</li>
|
|
87
87
|
<li>
|
|
88
88
|
<b>@angular/material-moment-adapter</b> : 14.0.4</li>
|
|
89
|
+
<li>
|
|
90
|
+
<b>angular-animations</b> : 0.11.0</li>
|
|
91
|
+
<li>
|
|
92
|
+
<b>@angular-eslint/builder</b> : 13.2.1</li>
|
|
93
|
+
<li>
|
|
94
|
+
<b>@angular-eslint/eslint-plugin</b> : 13.2.1</li>
|
|
95
|
+
<li>
|
|
96
|
+
<b>@angular-eslint/eslint-plugin-template</b> : 13.2.1</li>
|
|
97
|
+
<li>
|
|
98
|
+
<b>@angular-eslint/schematics</b> : 13.2.1</li>
|
|
99
|
+
<li>
|
|
100
|
+
<b>@angular-eslint/template-parser</b> : 13.2.1</li>
|
|
101
|
+
<li>
|
|
102
|
+
<b>eslint-plugin-prefer-arrow</b> : 1.2.3</li>
|
|
103
|
+
<li>
|
|
104
|
+
<b>eslint-plugin-jsdoc</b> : 38.1.6</li>
|
|
105
|
+
<li>
|
|
106
|
+
<b>@typescript-eslint/parser</b> : 5.27.0</li>
|
|
107
|
+
<li>
|
|
108
|
+
<b>@typescript-eslint/eslint-plugin</b> : 5.27.0</li>
|
|
109
|
+
<li>
|
|
110
|
+
<b>@typescript-eslint/eslint-plugin-tslint</b> : 5.27.0</li>
|
|
111
|
+
<li>
|
|
112
|
+
<b>eslint-plugin-import</b> : 2.26.0</li>
|
|
113
|
+
<li>
|
|
114
|
+
<b>jsdoc</b> : 3.6.10</li>
|
|
89
115
|
<li>
|
|
90
116
|
<b>@webcomponents/custom-elements</b> : 1.5.0</li>
|
|
117
|
+
<li>
|
|
118
|
+
<b>eslint</b> : 8.16.0</li>
|
|
91
119
|
<li>
|
|
92
120
|
<b>rxjs</b> : 7.5.5</li>
|
|
93
121
|
<li>
|
|
@@ -98,10 +126,12 @@
|
|
|
98
126
|
<b>typescript</b> : 4.6.4</li>
|
|
99
127
|
<li>
|
|
100
128
|
<b>rxjs-tslint</b> : 0.1.8</li>
|
|
101
|
-
<li>
|
|
102
|
-
<b>@types/node</b> : 17.0.33</li>
|
|
103
129
|
<li>
|
|
104
130
|
<b>@types/jasmine</b> : 4.0.3</li>
|
|
131
|
+
<li>
|
|
132
|
+
<b>@types/node</b> : 17.0.36</li>
|
|
133
|
+
<li>
|
|
134
|
+
<b>moment-timezone</b> : 0.5.34</li>
|
|
105
135
|
<li>
|
|
106
136
|
<b>jasmine-core</b> : 4.1.1</li>
|
|
107
137
|
<li>
|
|
@@ -129,13 +159,13 @@
|
|
|
129
159
|
<li>
|
|
130
160
|
<b>tsickle</b> : 0.46.0</li>
|
|
131
161
|
<li>
|
|
132
|
-
<b>ts-node</b> : 10.
|
|
162
|
+
<b>ts-node</b> : 10.8.0</li>
|
|
133
163
|
<li>
|
|
134
164
|
<b>@types/jasminewd2</b> : 2.0.10</li>
|
|
135
165
|
<li>
|
|
136
166
|
<b>@types/lodash</b> : 4.14.182</li>
|
|
137
167
|
<li>
|
|
138
|
-
<b>core-js</b> : 3.22.
|
|
168
|
+
<b>core-js</b> : 3.22.6</li>
|
|
139
169
|
<li>
|
|
140
170
|
<b>@ngrx/effects</b> : 13.2.0</li>
|
|
141
171
|
<li>
|
|
@@ -165,9 +195,9 @@
|
|
|
165
195
|
<li>
|
|
166
196
|
<b>ng2-pdfjs-viewer</b> : 13.2.2</li>
|
|
167
197
|
<li>
|
|
168
|
-
<b>ngx-
|
|
198
|
+
<b>ngx-mask</b> : 14.0.3</li>
|
|
169
199
|
<li>
|
|
170
|
-
<b>moment
|
|
200
|
+
<b>ngx-moment</b> : 6.0.2</li>
|
|
171
201
|
<li>
|
|
172
202
|
<b>bootstrap</b> : 5.1.3</li>
|
|
173
203
|
<li>
|
|
@@ -192,6 +222,8 @@
|
|
|
192
222
|
<b>@compodoc/compodoc</b> : 1.1.19</li>
|
|
193
223
|
<li>
|
|
194
224
|
<b>@compodoc/ngd-transformer</b> : 2.1.0</li>
|
|
225
|
+
<li>
|
|
226
|
+
<b>marked</b> : 1.2.9</li>
|
|
195
227
|
<li>
|
|
196
228
|
<b>ngx-perfect-scrollbar</b> : 10.1.1</li>
|
|
197
229
|
<li>
|
|
@@ -217,7 +249,7 @@
|
|
|
217
249
|
<li>
|
|
218
250
|
<b>stylelint-order</b> : 5.0.0</li>
|
|
219
251
|
<li>
|
|
220
|
-
<b>stylelint-scss</b> : 4.0
|
|
252
|
+
<b>stylelint-scss</b> : 4.2.0</li>
|
|
221
253
|
<li>
|
|
222
254
|
<b>tslint</b> : 6.1.3</li>
|
|
223
255
|
<li>
|
|
@@ -233,9 +265,7 @@
|
|
|
233
265
|
<li>
|
|
234
266
|
<b>pikaday</b> : 1.8.2</li>
|
|
235
267
|
<li>
|
|
236
|
-
<b>
|
|
237
|
-
<li>
|
|
238
|
-
<b>apexcharts</b> : 3.35.2</li>
|
|
268
|
+
<b>apexcharts</b> : 3.35.3</li>
|
|
239
269
|
<li>
|
|
240
270
|
<b>@eui/styles-base</b> : 14.0.1-snapshot-1655317603221</li>
|
|
241
271
|
<li>
|
|
@@ -256,7 +256,7 @@ you pass a string that's a key of the Service State type it will retrieve th
|
|
|
256
256
|
</tr>
|
|
257
257
|
<tr>
|
|
258
258
|
<td class="col-md-4">
|
|
259
|
-
<code>getState(key:
|
|
259
|
+
<code>getState(key: A)</code>
|
|
260
260
|
</td>
|
|
261
261
|
</tr>
|
|
262
262
|
|
|
@@ -266,7 +266,7 @@ you pass a string that's a key of the Service State type it will retrieve th
|
|
|
266
266
|
<td class="col-md-4">
|
|
267
267
|
<b>Type parameters :</b>
|
|
268
268
|
<ul class="type-parameters">
|
|
269
|
-
<li>
|
|
269
|
+
<li>A</li>
|
|
270
270
|
</ul>
|
|
271
271
|
</td>
|
|
272
272
|
</tr>
|
|
@@ -289,7 +289,7 @@ you pass a string that's a key of the Service State type it will retrieve th
|
|
|
289
289
|
<tr>
|
|
290
290
|
<td>key</td>
|
|
291
291
|
<td>
|
|
292
|
-
<code>
|
|
292
|
+
<code>A</code>
|
|
293
293
|
</td>
|
|
294
294
|
|
|
295
295
|
<td>
|