diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.js
index eff080d3c2..433c83aaab 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.6.10
+ * @license AngularJS v1.7.9
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -17,7 +17,7 @@
angular.module('ngCookies', ['ng']).
- info({ angularVersion: '1.6.10' }).
+ info({ angularVersion: '1.7.9' }).
/**
* @ngdoc provider
* @name $cookiesProvider
@@ -43,6 +43,10 @@ angular.module('ngCookies', ['ng']).
* or a Date object indicating the exact date/time this cookie will expire.
* - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a
* secured connection.
+ * - **samesite** - `{string}` - prevents the browser from sending the cookie along with cross-site requests.
+ * Accepts the values `lax` and `strict`. See the [OWASP Wiki](https://www.owasp.org/index.php/SameSite)
+ * for more info. Note that as of May 2018, not all browsers support `SameSite`,
+ * so it cannot be used as a single measure against Cross-Site-Request-Forgery (CSRF) attacks.
*
* Note: By default, the address that appears in your `` tag will be used as the path.
* This is important so that cookies will be visible for all routes when html5mode is enabled.
@@ -185,84 +189,6 @@ angular.module('ngCookies', ['ng']).
}];
}]);
-angular.module('ngCookies').
-/**
- * @ngdoc service
- * @name $cookieStore
- * @deprecated
- * sinceVersion="v1.4.0"
- * Please use the {@link ngCookies.$cookies `$cookies`} service instead.
- *
- * @requires $cookies
- *
- * @description
- * Provides a key-value (string-object) storage, that is backed by session cookies.
- * Objects put or retrieved from this storage are automatically serialized or
- * deserialized by AngularJS's `toJson`/`fromJson`.
- *
- * Requires the {@link ngCookies `ngCookies`} module to be installed.
- *
- * @example
- *
- * ```js
- * angular.module('cookieStoreExample', ['ngCookies'])
- * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
- * // Put cookie
- * $cookieStore.put('myFavorite','oatmeal');
- * // Get cookie
- * var favoriteCookie = $cookieStore.get('myFavorite');
- * // Removing a cookie
- * $cookieStore.remove('myFavorite');
- * }]);
- * ```
- */
- factory('$cookieStore', ['$cookies', function($cookies) {
-
- return {
- /**
- * @ngdoc method
- * @name $cookieStore#get
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
- */
- get: function(key) {
- return $cookies.getObject(key);
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#put
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- */
- put: function(key, value) {
- $cookies.putObject(key, value);
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#remove
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- */
- remove: function(key) {
- $cookies.remove(key);
- }
- };
-
- }]);
-
/**
* @name $$cookieWriter
* @requires $document
@@ -296,6 +222,7 @@ function $$CookieWriter($document, $log, $browser) {
str += options.domain ? ';domain=' + options.domain : '';
str += expires ? ';expires=' + expires.toUTCString() : '';
str += options.secure ? ';secure' : '';
+ str += options.samesite ? ';samesite=' + options.samesite : '';
// per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
// - 300 cookies
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js
index f1e70564ab..1ca85b767d 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js
@@ -1,9 +1,9 @@
/*
- AngularJS v1.6.10
+ AngularJS v1.7.9
(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).info({angularVersion:"1.6.10"}).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore",
-["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular);
+(function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.9"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject=
+["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular);
//# sourceMappingURL=angular-cookies.min.js.map
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js.map b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js.map
index 18ae127ccf..c642643bf8 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js.map
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/angular-cookies.min.js.map
@@ -2,7 +2,7 @@
"version":3,
"file":"angular-cookies.min.js",
"lineCount":8,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA+Q3BC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOX,CAAAa,UAAA,CAAkBH,CAAAC,KAAlB,CAAA,CAAkCD,CAAAC,KAAlC,CAAiDN,CACpDL,EAAAc,YAAA,CAAoBL,CAApB,CAAJ,GACEG,CACA,CADU,+BACV,CAAAH,CAAA,CAAQ,EAFV,CAIIT,EAAAe,SAAA,CAAiBH,CA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,CAAb,CAAsB,CACvC,IAAA+B,IAAA,CAASJ,CAAT,CAAcrC,CAAA4C,OAAA,CAAenC,CAAf,CAAd,CAAqCC,CAArC,CADuC,CAvEpC,CAsFLmC,OAAQA,QAAQ,CAACR,CAAD,CAAM3B,CAAN,CAAe,CAC7ByB,CAAA,CAAeE,CAAf,CAAoBS,IAAAA,EAApB,CAA2CpC,CAtHxC,CAAUV,CAAA0C,OAAA,CAAe,EAAf,CAAmBV,CAAnB,CAsH8BtB,CAtH9B,CAAV,CAAkDsB,CAsHrD,CAD6B,CAtF1B,CADiF,CAA9E,CAvEiD,CAAzC,CARxB,CAmOA/B,EAAA8C,QAAA;AAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB/C,EAAA2B,OAAA,CAAe,WAAf,CAAAG,SAAA,CAAqC,gBAArC,CAAoEkB,QAA+B,EAAG,CACpG,IAAAf,KAAA,CAAYhC,CADwF,CAAtG,CAlP2B,CAA1B,CAAD,CAuPGF,MAvPH,CAuPWA,MAAAC,QAvPX;",
"sources":["angular-cookies.js"],
-"names":["window","angular","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","info","angularVersion","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","undefined","factory","$cookies","$inject","$$CookieWriterProvider"]
+"names":["window","angular","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","samesite","cookieLength","length","warn","cookie","module","info","angularVersion","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","undefined","$inject","$$CookieWriterProvider"]
}
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/bower.json b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/bower.json
index c124163108..64c0379d6f 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/bower.json
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/bower.json
@@ -1,10 +1,10 @@
{
"name": "angular-cookies",
- "version": "1.6.10",
+ "version": "1.7.9",
"license": "MIT",
"main": "./angular-cookies.js",
"ignore": [],
"dependencies": {
- "angular": "1.6.10"
+ "angular": "1.7.9"
}
}
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/package.json b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/package.json
index 433b6f7c71..bc7e523904 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/package.json
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-cookies/package.json
@@ -1,27 +1,27 @@
{
- "_from": "angular-cookies@1.6.10",
- "_id": "angular-cookies@1.6.10",
+ "_from": "angular-cookies@1.7.9",
+ "_id": "angular-cookies@1.7.9",
"_inBundle": false,
- "_integrity": "sha512-ADfbqXLhwcaecAiWIaxpl8XWFJgWsrDl/ksSEkYm5dSoXHYlj3HKlAhPbjBv/foYS7pdI0apmSGHWrBPqdjF/g==",
+ "_integrity": "sha512-3eRq/aPrtCZKDWQnc3nW3sFoMbLiHkCkyDF2O9u7VXnqvVsUPaipk5R1ZqahgcSQHQrN/F5IU4T4nrz52qAZmA==",
"_location": "/angular-cookies",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "angular-cookies@1.6.10",
+ "raw": "angular-cookies@1.7.9",
"name": "angular-cookies",
"escapedName": "angular-cookies",
- "rawSpec": "1.6.10",
+ "rawSpec": "1.7.9",
"saveSpec": null,
- "fetchSpec": "1.6.10"
+ "fetchSpec": "1.7.9"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.6.10.tgz",
- "_shasum": "20a014d501242e2edacd21397c0e5480e08dee00",
- "_spec": "angular-cookies@1.6.10",
- "_where": "/home/aszczucz/scm/keycloak/keycloak2/themes/src/main/resources/theme/keycloak/common/resources",
+ "_resolved": "https://registry.npmjs.org/angular-cookies/-/angular-cookies-1.7.9.tgz",
+ "_shasum": "0f0cd2a9d1c81e5b8d6c6711d41f0909f9d0b8e0",
+ "_spec": "angular-cookies@1.7.9",
+ "_where": "/home/abstractj/github/keycloak/keycloak-server-pull-requests/themes/src/main/resources/theme/keycloak/common/resources",
"author": {
"name": "Angular Core Team",
"email": "angular-core+npm@google.com"
@@ -59,5 +59,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
- "version": "1.6.10"
+ "version": "1.7.9"
}
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.js
index 7f9b61b3ac..1c8ebfe4c5 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.6.10
+ * @license AngularJS v1.7.9
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -76,7 +76,8 @@ function toDebugString(obj, maxDepth) {
*/
var minErrConfig = {
- objectMaxDepth: 5
+ objectMaxDepth: 5,
+ urlErrorParamsEnabled: true
};
/**
@@ -99,12 +100,21 @@ var minErrConfig = {
* * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a
* non-positive or non-numeric value, removes the max depth limit.
* Default: 5
+ *
+ * * `urlErrorParamsEnabled` **{Boolean}** - Specifies wether the generated error url will
+ * contain the parameters of the thrown error. Disabling the parameters can be useful if the
+ * generated error url is very long.
+ *
+ * Default: true. When used without argument, it returns the current value.
*/
function errorHandlingConfig(config) {
if (isObject(config)) {
if (isDefined(config.objectMaxDepth)) {
minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN;
}
+ if (isDefined(config.urlErrorParamsEnabled) && isBoolean(config.urlErrorParamsEnabled)) {
+ minErrConfig.urlErrorParamsEnabled = config.urlErrorParamsEnabled;
+ }
} else {
return minErrConfig;
}
@@ -119,6 +129,7 @@ function isValidObjectMaxDepth(maxDepth) {
return isNumber(maxDepth) && maxDepth > 0;
}
+
/**
* @description
*
@@ -152,7 +163,7 @@ function isValidObjectMaxDepth(maxDepth) {
function minErr(module, ErrorConstructor) {
ErrorConstructor = ErrorConstructor || Error;
- var url = 'https://errors.angularjs.org/1.6.10/';
+ var url = 'https://errors.angularjs.org/1.7.9/';
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
var errRegExp = new RegExp(regex, 'g');
@@ -182,8 +193,10 @@ function minErr(module, ErrorConstructor) {
message += '\n' + url + (module ? module + '/' : '') + code;
- for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
- message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]);
+ if (minErrConfig.urlErrorParamsEnabled) {
+ for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
+ message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]);
+ }
}
return new ErrorConstructor(message);
@@ -518,7 +531,8 @@ function setupModuleLoader(window) {
* @ngdoc method
* @name angular.Module#component
* @module ng
- * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp)
+ * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match ``),
+ * or an object map of components where the keys are the names and the values are the component definition objects.
* @param {Object} options Component definition object (a simplified
* {@link ng.$compile#directive-definition-object directive definition object})
*
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.min.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.min.js
index 5e22dfaad1..7698a644be 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.min.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-loader/angular-loader.min.js
@@ -1,9 +1,9 @@
/*
- AngularJS v1.6.10
+ AngularJS v1.7.9
(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(){'use strict';function g(a,f){f=f||Error;return function(){var d=arguments[0],e;e="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.6.10/"+(a?a+"/":"")+d;for(d=1;d=} actions Hash with declaration of custom actions that will be available
* in addition to the default set of resource actions (see below). If a custom action has the same
@@ -139,9 +139,11 @@ function shallowClearAndCopy(src, dst) {
*
* The declaration should be created in the format of {@link ng.$http#usage $http.config}:
*
- * {action1: {method:?, params:?, isArray:?, headers:?, ...},
- * action2: {method:?, params:?, isArray:?, headers:?, ...},
- * ...}
+ * {
+ * action1: {method:?, params:?, isArray:?, headers:?, ...},
+ * action2: {method:?, params:?, isArray:?, headers:?, ...},
+ * ...
+ * }
*
* Where:
*
@@ -153,54 +155,58 @@ function shallowClearAndCopy(src, dst) {
* the parameter value is a function, it will be called every time when a param value needs to
* be obtained for a request (unless the param was overridden). The function will be passed the
* current data value as an argument.
- * - **`url`** – {string} – action specific `url` override. The url templating is supported just
+ * - **`url`** – {string} – Action specific `url` override. The url templating is supported just
* like for the resource-level urls.
* - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
* see `returns` section.
* - **`transformRequest`** –
* `{function(data, headersGetter)|Array.}` –
- * transform function or an array of such functions. The transform function takes the http
+ * Transform function or an array of such functions. The transform function takes the http
* request body and headers and returns its transformed (typically serialized) version.
* By default, transformRequest will contain one function that checks if the request data is
* an object and serializes it using `angular.toJson`. To prevent this behavior, set
* `transformRequest` to an empty array: `transformRequest: []`
* - **`transformResponse`** –
* `{function(data, headersGetter, status)|Array.}` –
- * transform function or an array of such functions. The transform function takes the http
+ * Transform function or an array of such functions. The transform function takes the HTTP
* response body, headers and status and returns its transformed (typically deserialized)
* version.
* By default, transformResponse will contain one function that checks if the response looks
* like a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior,
* set `transformResponse` to an empty array: `transformResponse: []`
- * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory} is supplied, this cache will be used for
- * caching.
- * - **`timeout`** – `{number}` – timeout in milliseconds.
+ * - **`cache`** – `{boolean|Cache}` – A boolean value or object created with
+ * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response.
+ * See {@link $http#caching $http Caching} for more information.
+ * - **`timeout`** – `{number}` – Timeout in milliseconds.
* **Note:** In contrast to {@link ng.$http#usage $http.config}, {@link ng.$q promises} are
- * **not** supported in $resource, because the same value would be used for multiple requests.
+ * **not** supported in `$resource`, because the same value would be used for multiple requests.
* If you are looking for a way to cancel requests, you should use the `cancellable` option.
- * - **`cancellable`** – `{boolean}` – if set to true, the request made by a "non-instance" call
- * will be cancelled (if not already completed) by calling `$cancelRequest()` on the call's
- * return value. Calling `$cancelRequest()` for a non-cancellable or an already
- * completed/cancelled request will have no effect.
- * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
+ * - **`cancellable`** – `{boolean}` – If true, the request made by a "non-instance" call will be
+ * cancelled (if not already completed) by calling `$cancelRequest()` on the call's return
+ * value. Calling `$cancelRequest()` for a non-cancellable or an already completed/cancelled
+ * request will have no effect.
+ * - **`withCredentials`** – `{boolean}` – Whether to set the `withCredentials` flag on the
* XHR object. See
- * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
+ * [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)
* for more information.
- * - **`responseType`** - `{string}` - see
- * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
- * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
- * `response` and `responseError`. Both `response` and `responseError` interceptors get called
- * with `http response` object. See {@link ng.$http $http interceptors}. In addition, the
- * resource instance or array object is accessible by the `resource` property of the
- * `http response` object.
+ * - **`responseType`** – `{string}` – See
+ * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType).
+ * - **`interceptor`** – `{Object=}` – The interceptor object has four optional methods -
+ * `request`, `requestError`, `response`, and `responseError`. See
+ * {@link ng.$http#interceptors $http interceptors} for details. Note that
+ * `request`/`requestError` interceptors are applied before calling `$http`, thus before any
+ * global `$http` interceptors. Also, rejecting or throwing an error inside the `request`
+ * interceptor will result in calling the `responseError` interceptor.
+ * The resource instance or collection is available on the `resource` property of the
+ * `http response` object passed to `response`/`responseError` interceptors.
* Keep in mind that the associated promise will be resolved with the value returned by the
- * response interceptor, if one is specified. The default response interceptor returns
- * `response.resource` (i.e. the resource instance or array).
- * - **`hasBody`** - `{boolean}` - allows to specify if a request body should be included or not.
- * If not specified only POST, PUT and PATCH requests will have a body.
- *
+ * response interceptors. Make sure you return an appropriate value and not the `response`
+ * object passed as input. For reference, the default `response` interceptor (which gets applied
+ * if you don't specify a custom one) returns `response.resource`.
+ * See {@link ngResource.$resource#using-interceptors below} for an example of using
+ * interceptors in `$resource`.
+ * - **`hasBody`** – `{boolean}` – If true, then the request will have a body.
+ * If not specified, then only POST, PUT and PATCH requests will have a body. *
* @param {Object} options Hash with custom settings that should extend the
* default `$resourceProvider` behavior. The supported options are:
*
@@ -213,27 +219,29 @@ function shallowClearAndCopy(src, dst) {
* @returns {Object} A resource "class" object with methods for the default set of resource actions
* optionally extended with custom `actions`. The default set contains these actions:
* ```js
- * { 'get': {method:'GET'},
- * 'save': {method:'POST'},
- * 'query': {method:'GET', isArray:true},
- * 'remove': {method:'DELETE'},
- * 'delete': {method:'DELETE'} };
+ * {
+ * 'get': {method: 'GET'},
+ * 'save': {method: 'POST'},
+ * 'query': {method: 'GET', isArray: true},
+ * 'remove': {method: 'DELETE'},
+ * 'delete': {method: 'DELETE'}
+ * }
* ```
*
- * Calling these methods invoke an {@link ng.$http} with the specified http method,
- * destination and parameters. When the data is returned from the server then the object is an
- * instance of the resource class. The actions `save`, `remove` and `delete` are available on it
- * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
- * read, update, delete) on server-side data like this:
+ * Calling these methods invoke {@link ng.$http} with the specified http method, destination and
+ * parameters. When the data is returned from the server then the object is an instance of the
+ * resource class. The actions `save`, `remove` and `delete` are available on it as methods with
+ * the `$` prefix. This allows you to easily perform CRUD operations (create, read, update,
+ * delete) on server-side data like this:
* ```js
- * var User = $resource('/user/:userId', {userId:'@id'});
- * var user = User.get({userId:123}, function() {
+ * var User = $resource('/user/:userId', {userId: '@id'});
+ * User.get({userId: 123}).$promise.then(function(user) {
* user.abc = true;
* user.$save();
* });
* ```
*
- * It is important to realize that invoking a $resource object method immediately returns an
+ * It is important to realize that invoking a `$resource` object method immediately returns an
* empty reference (object or array depending on `isArray`). Once the data is returned from the
* server the existing reference is populated with the actual data. This is a useful trick since
* usually the resource is assigned to a model which is then rendered by the view. Having an empty
@@ -256,30 +264,31 @@ function shallowClearAndCopy(src, dst) {
*
*
* Success callback is called with (value (Object|Array), responseHeaders (Function),
- * status (number), statusText (string)) arguments, where the value is the populated resource
+ * status (number), statusText (string)) arguments, where `value` is the populated resource
* instance or collection object. The error callback is called with (httpResponse) argument.
*
- * Class actions return empty instance (with additional properties below).
- * Instance actions return promise of the action.
+ * Class actions return an empty instance (with the additional properties listed below).
+ * Instance actions return a promise for the operation.
*
* The Resource instances and collections have these additional properties:
*
- * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
+ * - `$promise`: The {@link ng.$q promise} of the original server interaction that created this
* instance or collection.
*
* On success, the promise is resolved with the same resource instance or collection object,
- * updated with data from server. This makes it easy to use in
- * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
+ * updated with data from server. This makes it easy to use in the
+ * {@link ngRoute.$routeProvider `resolve` section of `$routeProvider.when()`} to defer view
* rendering until the resource(s) are loaded.
*
* On failure, the promise is rejected with the {@link ng.$http http response} object.
*
* If an interceptor object was provided, the promise will instead be resolved with the value
- * returned by the interceptor.
+ * returned by the response interceptor (on success) or responceError interceptor (on failure).
*
* - `$resolved`: `true` after first server interaction is completed (either with success or
* rejection), `false` before that. Knowing if the Resource has been resolved is useful in
- * data-binding.
+ * data-binding. If there is a response/responseError interceptor and it returns a promise,
+ * `$resolved` will wait for that too.
*
* The Resource instances and collections have these additional methods:
*
@@ -296,121 +305,128 @@ function shallowClearAndCopy(src, dst) {
*
* @example
*
- * ### Credit card resource
+ * ### Basic usage
*
- * ```js
- // Define CreditCard class
- var CreditCard = $resource('/user/:userId/card/:cardId',
- {userId:123, cardId:'@id'}, {
- charge: {method:'POST', params:{charge:true}}
- });
+ ```js
+ // Define a CreditCard class
+ var CreditCard = $resource('/users/:userId/cards/:cardId',
+ {userId: 123, cardId: '@id'}, {
+ charge: {method: 'POST', params: {charge: true}}
+ });
// We can retrieve a collection from the server
- var cards = CreditCard.query(function() {
- // GET: /user/123/card
- // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+ var cards = CreditCard.query();
+ // GET: /users/123/cards
+ // server returns: [{id: 456, number: '1234', name: 'Smith'}]
+ // Wait for the request to complete
+ cards.$promise.then(function() {
var card = cards[0];
- // each item is an instance of CreditCard
- expect(card instanceof CreditCard).toEqual(true);
- card.name = "J. Smith";
- // non GET methods are mapped onto the instances
- card.$save();
- // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
- // server returns: {id:456, number:'1234', name: 'J. Smith'};
- // our custom method is mapped as well.
- card.$charge({amount:9.99});
- // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+ // Each item is an instance of CreditCard
+ expect(card instanceof CreditCard).toEqual(true);
+
+ // Non-GET methods are mapped onto the instances
+ card.name = 'J. Smith';
+ card.$save();
+ // POST: /users/123/cards/456 {id: 456, number: '1234', name: 'J. Smith'}
+ // server returns: {id: 456, number: '1234', name: 'J. Smith'}
+
+ // Our custom method is mapped as well (since it uses POST)
+ card.$charge({amount: 9.99});
+ // POST: /users/123/cards/456?amount=9.99&charge=true {id: 456, number: '1234', name: 'J. Smith'}
});
- // we can create an instance as well
- var newCard = new CreditCard({number:'0123'});
- newCard.name = "Mike Smith";
- newCard.$save();
- // POST: /user/123/card {number:'0123', name:'Mike Smith'}
- // server returns: {id:789, number:'0123', name: 'Mike Smith'};
- expect(newCard.id).toEqual(789);
- * ```
+ // We can create an instance as well
+ var newCard = new CreditCard({number: '0123'});
+ newCard.name = 'Mike Smith';
+
+ var savePromise = newCard.$save();
+ // POST: /users/123/cards {number: '0123', name: 'Mike Smith'}
+ // server returns: {id: 789, number: '0123', name: 'Mike Smith'}
+
+ savePromise.then(function() {
+ // Once the promise is resolved, the created instance
+ // is populated with the data returned by the server
+ expect(newCard.id).toEqual(789);
+ });
+ ```
*
- * The object returned from this function execution is a resource "class" which has "static" method
- * for each action in the definition.
+ * The object returned from a call to `$resource` is a resource "class" which has one "static"
+ * method for each action in the definition.
*
- * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
- * `headers`.
+ * Calling these methods invokes `$http` on the `url` template with the given HTTP `method`,
+ * `params` and `headers`.
*
* @example
*
- * ### User resource
+ * ### Accessing the response
*
* When the data is returned from the server then the object is an instance of the resource type and
* all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
* operations (create, read, update, delete) on server-side data.
-
+ *
```js
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123}, function(user) {
+ var User = $resource('/users/:userId', {userId: '@id'});
+ User.get({userId: 123}).$promise.then(function(user) {
user.abc = true;
user.$save();
});
```
*
- * It's worth noting that the success callback for `get`, `query` and other methods gets passed
- * in the response that came from the server as well as $http header getter function, so one
- * could rewrite the above example and get access to http headers as:
+ * It's worth noting that the success callback for `get`, `query` and other methods gets called with
+ * the resource instance (populated with the data that came from the server) as well as an `$http`
+ * header getter function, the HTTP status code and the response status text. So one could rewrite
+ * the above example and get access to HTTP headers as follows:
*
```js
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123}, function(user, getResponseHeaders){
+ var User = $resource('/users/:userId', {userId: '@id'});
+ User.get({userId: 123}, function(user, getResponseHeaders) {
user.abc = true;
user.$save(function(user, putResponseHeaders) {
- //user => saved user object
- //putResponseHeaders => $http header getter
+ // `user` => saved `User` object
+ // `putResponseHeaders` => `$http` header getter
});
});
```
*
- * You can also access the raw `$http` promise via the `$promise` property on the object returned
- *
- ```
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123})
- .$promise.then(function(user) {
- $scope.user = user;
- });
- ```
- *
* @example
*
- * ### Creating a custom 'PUT' request
+ * ### Creating custom actions
*
- * In this example we create a custom method on our resource to make a PUT request
- * ```js
- * var app = angular.module('app', ['ngResource', 'ngRoute']);
+ * In this example we create a custom method on our resource to make a PUT request:
*
- * // Some APIs expect a PUT request in the format URL/object/ID
- * // Here we are creating an 'update' method
- * app.factory('Notes', ['$resource', function($resource) {
- * return $resource('/notes/:id', null,
- * {
- * 'update': { method:'PUT' }
- * });
- * }]);
- *
- * // In our controller we get the ID from the URL using ngRoute and $routeParams
- * // We pass in $routeParams and our Notes factory along with $scope
- * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
- function($scope, $routeParams, Notes) {
- * // First get a note object from the factory
- * var note = Notes.get({ id:$routeParams.id });
- * $id = note.id;
- *
- * // Now call update passing in the ID first then the object you are updating
- * Notes.update({ id:$id }, note);
- *
- * // This will PUT /notes/ID with the note object in the request payload
- * }]);
- * ```
+ ```js
+ var app = angular.module('app', ['ngResource']);
+
+ // Some APIs expect a PUT request in the format URL/object/ID
+ // Here we are creating an 'update' method
+ app.factory('Notes', ['$resource', function($resource) {
+ return $resource('/notes/:id', {id: '@id'}, {
+ update: {method: 'PUT'}
+ });
+ }]);
+
+ // In our controller we get the ID from the URL using `$location`
+ app.controller('NotesCtrl', ['$location', 'Notes', function($location, Notes) {
+ // First, retrieve the corresponding `Note` object from the server
+ // (Assuming a URL of the form `.../notes?id=XYZ`)
+ var noteId = $location.search().id;
+ var note = Notes.get({id: noteId});
+
+ note.$promise.then(function() {
+ note.content = 'Hello, world!';
+
+ // Now call `update` to save the changes on the server
+ Notes.update(note);
+ // This will PUT /notes/ID with the note object as the request payload
+
+ // Since `update` is a non-GET method, it will also be available on the instance
+ // (prefixed with `$`), so we could replace the `Note.update()` call with:
+ //note.$update();
+ });
+ }]);
+ ```
*
* @example
*
@@ -421,7 +437,7 @@ function shallowClearAndCopy(src, dst) {
*
```js
// ...defining the `Hotel` resource...
- var Hotel = $resource('/api/hotel/:id', {id: '@id'}, {
+ var Hotel = $resource('/api/hotels/:id', {id: '@id'}, {
// Let's make the `query()` method cancellable
query: {method: 'get', isArray: true, cancellable: true}
});
@@ -431,17 +447,57 @@ function shallowClearAndCopy(src, dst) {
this.onDestinationChanged = function onDestinationChanged(destination) {
// We don't care about any pending request for hotels
// in a different destination any more
- this.availableHotels.$cancelRequest();
+ if (this.availableHotels) {
+ this.availableHotels.$cancelRequest();
+ }
- // Let's query for hotels in ''
- // (calls: /api/hotel?location=)
+ // Let's query for hotels in `destination`
+ // (calls: /api/hotels?location=)
this.availableHotels = Hotel.query({location: destination});
};
```
*
+ * @example
+ *
+ * ### Using interceptors
+ *
+ * You can use interceptors to transform the request or response, perform additional operations, and
+ * modify the returned instance/collection. The following example, uses `request` and `response`
+ * interceptors to augment the returned instance with additional info:
+ *
+ ```js
+ var Thing = $resource('/api/things/:id', {id: '@id'}, {
+ save: {
+ method: 'POST',
+ interceptor: {
+ request: function(config) {
+ // Before the request is sent out, store a timestamp on the request config
+ config.requestTimestamp = Date.now();
+ return config;
+ },
+ response: function(response) {
+ // Get the instance from the response object
+ var instance = response.resource;
+
+ // Augment the instance with a custom `saveLatency` property, computed as the time
+ // between sending the request and receiving the response.
+ instance.saveLatency = Date.now() - response.config.requestTimestamp;
+
+ // Return the instance
+ return instance;
+ }
+ }
+ }
+ });
+
+ Thing.save({foo: 'bar'}).$promise.then(function(thing) {
+ console.log('That thing was saved in ' + thing.saveLatency + 'ms.');
+ });
+ ```
+ *
*/
angular.module('ngResource', ['ng']).
- info({ angularVersion: '1.6.10' }).
+ info({ angularVersion: '1.7.9' }).
provider('$resource', function ResourceProvider() {
var PROTOCOL_AND_IPV6_REGEX = /^https?:\/\/\[[^\]]*][^/]*/;
@@ -671,34 +727,34 @@ angular.module('ngResource', ['ng']).
}
Resource[name] = function(a1, a2, a3, a4) {
- var params = {}, data, success, error;
+ var params = {}, data, onSuccess, onError;
switch (arguments.length) {
case 4:
- error = a4;
- success = a3;
+ onError = a4;
+ onSuccess = a3;
// falls through
case 3:
case 2:
if (isFunction(a2)) {
if (isFunction(a1)) {
- success = a1;
- error = a2;
+ onSuccess = a1;
+ onError = a2;
break;
}
- success = a2;
- error = a3;
+ onSuccess = a2;
+ onError = a3;
// falls through
} else {
params = a1;
data = a2;
- success = a3;
+ onSuccess = a3;
break;
}
// falls through
case 1:
- if (isFunction(a1)) success = a1;
+ if (isFunction(a1)) onSuccess = a1;
else if (hasBody) data = a1;
else params = a1;
break;
@@ -712,14 +768,20 @@ angular.module('ngResource', ['ng']).
var isInstanceCall = this instanceof Resource;
var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
var httpConfig = {};
+ var requestInterceptor = action.interceptor && action.interceptor.request || undefined;
+ var requestErrorInterceptor = action.interceptor && action.interceptor.requestError ||
+ undefined;
var responseInterceptor = action.interceptor && action.interceptor.response ||
defaultResponseInterceptor;
var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
- undefined;
- var hasError = !!error;
- var hasResponseErrorInterceptor = !!responseErrorInterceptor;
+ $q.reject;
+ var successCallback = onSuccess ? function(val) {
+ onSuccess(val, response.headers, response.status, response.statusText);
+ } : undefined;
+ var errorCallback = onError || undefined;
var timeoutDeferred;
var numericTimeoutPromise;
+ var response;
forEach(action, function(value, key) {
switch (key) {
@@ -748,8 +810,15 @@ angular.module('ngResource', ['ng']).
extend({}, extractParams(data, action.params || {}), params),
action.url);
- var promise = $http(httpConfig).then(function(response) {
- var data = response.data;
+ // Start the promise chain
+ var promise = $q.
+ resolve(httpConfig).
+ then(requestInterceptor).
+ catch(requestErrorInterceptor).
+ then($http);
+
+ promise = promise.then(function(resp) {
+ var data = resp.data;
if (data) {
// Need to convert action.isArray to boolean in case it is undefined
@@ -777,12 +846,14 @@ angular.module('ngResource', ['ng']).
value.$promise = promise; // Restore the promise
}
}
- response.resource = value;
- return response;
- }, function(response) {
- response.resource = value;
- return $q.reject(response);
+ resp.resource = value;
+ response = resp;
+ return responseInterceptor(resp);
+ }, function(rejectionOrResponse) {
+ rejectionOrResponse.resource = value;
+ response = rejectionOrResponse;
+ return responseErrorInterceptor(rejectionOrResponse);
});
promise = promise['finally'](function() {
@@ -794,25 +865,8 @@ angular.module('ngResource', ['ng']).
}
});
- promise = promise.then(
- function(response) {
- var value = responseInterceptor(response);
- (success || noop)(value, response.headers, response.status, response.statusText);
- return value;
- },
- (hasError || hasResponseErrorInterceptor) ?
- function(response) {
- if (hasError && !hasResponseErrorInterceptor) {
- // Avoid `Possibly Unhandled Rejection` error,
- // but still fulfill the returned promise with a rejection
- promise.catch(noop);
- }
- if (hasError) error(response);
- return hasResponseErrorInterceptor ?
- responseErrorInterceptor(response) :
- $q.reject(response);
- } :
- undefined);
+ // Run the `success`/`error` callbacks, but do not let them affect the returned promise.
+ promise.then(successCallback, errorCallback);
if (!isInstanceCall) {
// we are creating instance / collection
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-resource/angular-resource.min.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-resource/angular-resource.min.js
index d9ce09db87..8b924c3750 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-resource/angular-resource.min.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-resource/angular-resource.min.js
@@ -1,15 +1,15 @@
/*
- AngularJS v1.6.10
+ AngularJS v1.7.9
(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(U,a){'use strict';function L(m,f){f=f||{};a.forEach(f,function(a,d){delete f[d]});for(var d in m)!m.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(f[d]=m[d]);return f}var B=a.$$minErr("$resource"),Q=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;a.module("ngResource",["ng"]).info({angularVersion:"1.6.10"}).provider("$resource",function(){var m=/^https?:\/\/\[[^\]]*][^/]*/,f=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",
-isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(d,P,F,M){function C(a,d){this.template=a;this.defaults=n({},f.defaults,d);this.urlParams={}}var D=a.noop,r=a.forEach,n=a.extend,R=a.copy,N=a.isArray,w=a.isDefined,x=a.isFunction,S=a.isNumber,y=a.$$encodeUriQuery,T=a.$$encodeUriSegment;C.prototype={setUrlParams:function(a,d,f){var g=this,c=f||g.template,s,h,n="",b=g.urlParams=Object.create(null);r(c.split(/\W/),function(a){if("hasOwnProperty"===
-a)throw B("badname");!/^\d+$/.test(a)&&a&&(new RegExp("(^|[^\\\\]):"+a+"(\\W|$)")).test(c)&&(b[a]={isQueryParamValue:(new RegExp("\\?.*=:"+a+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(m,function(b){n=b;return""});d=d||{};r(g.urlParams,function(b,a){s=d.hasOwnProperty(a)?d[a]:g.defaults[a];w(s)&&null!==s?(h=b.isQueryParamValue?y(s,!0):T(s),c=c.replace(new RegExp(":"+a+"(\\W|$)","g"),function(b,a){return h+a})):c=c.replace(new RegExp("(/?):"+a+"(\\W|$)","g"),function(a,b,e){return"/"===
-e.charAt(0)?e:b+e})});g.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");a.url=n+c.replace(/\/(\\|%5C)\./,"/.");r(d,function(b,c){g.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}};return function(m,y,z,g){function c(b,c){var d={};c=n({},y,c);r(c,function(c,f){x(c)&&(c=c(b));var e;if(c&&c.charAt&&"@"===c.charAt(0)){e=b;var k=c.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!Q.test("."+k))throw B("badmember",k);for(var k=k.split("."),h=0,
-n=k.length;h
+ * **Note:** This option has no effect if `reloadOnUrl` is set to `false`.
+ *
*
* - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive
*
@@ -234,6 +291,9 @@ function $RouteProvider() {
this.when = function(path, route) {
//copy original route object to preserve params inherited from proto chain
var routeCopy = shallowCopy(route);
+ if (angular.isUndefined(routeCopy.reloadOnUrl)) {
+ routeCopy.reloadOnUrl = true;
+ }
if (angular.isUndefined(routeCopy.reloadOnSearch)) {
routeCopy.reloadOnSearch = true;
}
@@ -242,7 +302,8 @@ function $RouteProvider() {
}
routes[path] = angular.extend(
routeCopy,
- path && pathRegExp(path, routeCopy)
+ {originalPath: path},
+ path && routeToRegExp(path, routeCopy)
);
// create redirection for trailing slashes
@@ -252,8 +313,8 @@ function $RouteProvider() {
: path + '/';
routes[redirectPath] = angular.extend(
- {redirectTo: path},
- pathRegExp(redirectPath, routeCopy)
+ {originalPath: path, redirectTo: path},
+ routeToRegExp(redirectPath, routeCopy)
);
}
@@ -271,47 +332,6 @@ function $RouteProvider() {
*/
this.caseInsensitiveMatch = false;
- /**
- * @param path {string} path
- * @param opts {Object} options
- * @return {?Object}
- *
- * @description
- * Normalizes the given path, returning a regular expression
- * and the original path.
- *
- * Inspired by pathRexp in visionmedia/express/lib/utils.js.
- */
- function pathRegExp(path, opts) {
- var insensitive = opts.caseInsensitiveMatch,
- ret = {
- originalPath: path,
- regexp: path
- },
- keys = ret.keys = [];
-
- path = path
- .replace(/([().])/g, '\\$1')
- .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
- var optional = (option === '?' || option === '*?') ? '?' : null;
- var star = (option === '*' || option === '*?') ? '*' : null;
- keys.push({ name: key, optional: !!optional });
- slash = slash || '';
- return ''
- + (optional ? '' : slash)
- + '(?:'
- + (optional ? slash : '')
- + (star && '(.+?)' || '([^/]+)')
- + (optional || '')
- + ')'
- + (optional || '');
- })
- .replace(/([/$*])/g, '\\$1');
-
- ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
- return ret;
- }
-
/**
* @ngdoc method
* @name $routeProvider#otherwise
@@ -576,8 +596,9 @@ function $RouteProvider() {
* @name $route#$routeUpdate
* @eventType broadcast on root scope
* @description
- * The `reloadOnSearch` property has been set to false, and we are reusing the same
- * instance of the Controller.
+ * Broadcasted if the same instance of a route (including template, controller instance,
+ * resolved dependencies, etc.) is being reused. This can happen if either `reloadOnSearch` or
+ * `reloadOnUrl` has been set to `false`.
*
* @param {Object} angularEvent Synthetic event object
* @param {Route} current Current/previous route information.
@@ -685,9 +706,7 @@ function $RouteProvider() {
var lastRoute = $route.current;
preparedRoute = parseRoute();
- preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route
- && angular.equals(preparedRoute.pathParams, lastRoute.pathParams)
- && !preparedRoute.reloadOnSearch && !forceReload;
+ preparedRouteIsUpdateOnly = isNavigationUpdateOnly(preparedRoute, lastRoute);
if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {
if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {
@@ -712,7 +731,7 @@ function $RouteProvider() {
var nextRoutePromise = $q.resolve(nextRoute);
- $browser.$$incOutstandingRequestCount();
+ $browser.$$incOutstandingRequestCount('$route');
nextRoutePromise.
then(getRedirectionData).
@@ -740,7 +759,7 @@ function $RouteProvider() {
// `outstandingRequestCount` to hit zero. This is important in case we are redirecting
// to a new route which also requires some asynchronous work.
- $browser.$$completeOutstandingRequest(noop);
+ $browser.$$completeOutstandingRequest(noop, '$route');
});
}
}
@@ -867,6 +886,29 @@ function $RouteProvider() {
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
}
+ /**
+ * @param {Object} newRoute - The new route configuration (as returned by `parseRoute()`).
+ * @param {Object} oldRoute - The previous route configuration (as returned by `parseRoute()`).
+ * @returns {boolean} Whether this is an "update-only" navigation, i.e. the URL maps to the same
+ * route and it can be reused (based on the config and the type of change).
+ */
+ function isNavigationUpdateOnly(newRoute, oldRoute) {
+ // IF this is not a forced reload
+ return !forceReload
+ // AND both `newRoute`/`oldRoute` are defined
+ && newRoute && oldRoute
+ // AND they map to the same Route Definition Object
+ && (newRoute.$$route === oldRoute.$$route)
+ // AND `reloadOnUrl` is disabled
+ && (!newRoute.reloadOnUrl
+ // OR `reloadOnSearch` is disabled
+ || (!newRoute.reloadOnSearch
+ // AND both routes have the same path params
+ && angular.equals(newRoute.pathParams, oldRoute.pathParams)
+ )
+ );
+ }
+
/**
* @returns {string} interpolation of the redirect path with the parameters
*/
diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-route/angular-route.min.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-route/angular-route.min.js
index 7b908cecd0..d2622160be 100644
--- a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-route/angular-route.min.js
+++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/angular-route/angular-route.min.js
@@ -1,17 +1,17 @@
/*
- AngularJS v1.6.10
+ AngularJS v1.7.9
(c) 2010-2018 Google, Inc. http://angularjs.org
License: MIT
*/
-(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);n&&(n.$destroy(),n=null);p&&(l=g.leave(p),l.done(function(a){!1!==a&&(l=null)}),p=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;p=m(b,function(b){g.enter(b,null,p||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()});
-v()});n=c.scope=b;n.$emit("$viewContentLoaded");n.$eval(k)}else v()}var n,p,l,w=b.autoscroll,k=b.onload||"";a.$on("$routeChangeSuccess",E);E()}}}function C(d,k,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,c=b.locals;f.html(c.$template);var m=d(f.contents());if(b.controller){c.$scope=a;var v=k(b.controller,c);b.controllerAs&&(a[b.controllerAs]=v);f.data("$ngControllerController",v);f.children().data("$ngControllerController",v)}a[b.resolveAs||"$resolve"]=c;m(a)}}}var x,
-y,F,G,z=d.module("ngRoute",[]).info({angularVersion:"1.6.10"}).provider("$route",function(){function t(a,f){return d.extend(Object.create(a),f)}function u(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},g=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(a,b,d,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:d,optional:!!a});b=b||"";return""+(a?"":b)+"(?:"+(a?b:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([/$*])/g,
-"\\$1");c.regexp=new RegExp("^"+a+"$",b?"i":"");return c}x=d.isArray;y=d.isObject;F=d.isDefined;G=d.noop;var g={};this.when=function(a,f){var b;b=void 0;if(x(f)){b=b||[];for(var c=0,m=f.length;c/g,">")}function A(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,d=0,b=e.length;d"))},end:function(a){a=q(a);d||!0!==m[a]||!0===r[a]||(b(""),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||b(L(a))}}};
-J=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var z=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=f("area,br,col,hr,img,wbr"),x=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=f("rp,rt"),n=h({},p,x),x=h({},x,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=h({},p,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
+G=c.forEach;H=c.isArray;I=c.isDefined;q=c.$$lowercase;E=c.noop;K=function(a,e){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);var d=N(a);if(!d)return"";var b=5;do{if(0===b)throw D("uinput");b--;a=d.innerHTML;d=N(a)}while(a!==d.innerHTML);for(b=d.firstChild;b;){switch(b.nodeType){case 1:e.start(b.nodeName.toLowerCase(),Q(b.attributes));break;case 3:e.chars(b.textContent)}var k;if(!(k=b.firstChild)&&(1===b.nodeType&&e.end(b.nodeName.toLowerCase()),k=v("nextSibling",b),!k))for(;null==k;){b=
+v("parentNode",b);if(b===d)break;k=v("nextSibling",b);1===b.nodeType&&e.end(b.nodeName.toLowerCase())}b=k}for(;b=d.firstChild;)d.removeChild(b)};C=function(a,e){var d=!1,b=F(a,a.push);return{start:function(a,g){a=q(a);!d&&w[a]&&(d=a);d||!0!==m[a]||(b("<"),b(a),G(g,function(d,g){var c=q(g),f="img"===a&&"src"===c||"background"===c;!0!==M[c]||!0===O[c]&&!e(d,f)||(b(" "),b(g),b('="'),b(L(d)),b('"'))}),b(">"))},end:function(a){a=q(a);d||!0!==m[a]||!0===r[a]||(b(""),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||
+b(L(a))}}};J=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var z=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=f("area,br,col,hr,img,wbr"),x=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=f("rp,rt"),n=h({},p,x),x=h({},x,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=h({},p,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
l=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),m=h({},r,x,p,n),O=f("background,cite,href,longdesc,src,xlink:href,xml:base"),n=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),
p=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
!0),M=h({},O,p,n),N=function(a,e){function d(b){b=""+b;try{var d=(new a.DOMParser).parseFromString(b,"text/html").body;d.firstChild.remove();return d}catch(e){}}function b(a){c.innerHTML=a;e.documentMode&&A(c);return c}var g;if(e&&e.implementation)g=e.implementation.createHTMLDocument("inert");else throw D("noinert");var c=(g.documentElement||g.getDocumentElement()).querySelector("body");c.innerHTML='';return c.querySelector("svg")?
-(c.innerHTML='