@atlaskit/link-provider
Advanced tools
Comparing version 1.1.2 to 1.1.3
# @atlaskit/link-provider | ||
## 1.1.3 | ||
### Patch Changes | ||
- [`263ef1e543b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/263ef1e543b) - Change data structure of lpup data we get | ||
## 1.1.2 | ||
@@ -4,0 +10,0 @@ |
@@ -254,3 +254,3 @@ "use strict"; | ||
var userPreferences, defaultAppearance, appearanceMap, matchedPath; | ||
var userPreferences, defaultAppearance, appearances, matchedLabeledAppearance; | ||
return _regenerator.default.wrap(function _callee5$(_context5) { | ||
@@ -279,8 +279,9 @@ while (1) { | ||
defaultAppearance = userPreferences.defaultAppearance, appearanceMap = userPreferences.appearanceMap; | ||
matchedPath = Object.keys(appearanceMap).find(function (path) { | ||
return _this2.doesUrlMatchPath(path, url); | ||
defaultAppearance = userPreferences.defaultAppearance, appearances = userPreferences.appearances; | ||
matchedLabeledAppearance = appearances.find(function (_ref) { | ||
var urlSegment = _ref.urlSegment; | ||
return _this2.doesUrlMatchPath(urlSegment, url); | ||
}); | ||
if (!matchedPath) { | ||
if (!matchedLabeledAppearance) { | ||
_context5.next = 10; | ||
@@ -290,3 +291,3 @@ break; | ||
return _context5.abrupt("return", appearanceMap[matchedPath]); | ||
return _context5.abrupt("return", matchedLabeledAppearance.appearance); | ||
@@ -438,3 +439,3 @@ case 10: | ||
// eslint-disable-next-line | ||
console.warn("Error when trying to check Smart Card url \"".concat(url, " - ").concat(_context7.t1.prototype.name, " ").concat(_context7.t1.message), _context7.t1); | ||
console.warn("Error when trying to check Smart Card url \"".concat(url, " - ").concat(_context7.t1.name, " ").concat(_context7.t1.message), _context7.t1); | ||
@@ -441,0 +442,0 @@ case 26: |
{ | ||
"name": "@atlaskit/link-provider", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"sideEffects": false | ||
} |
@@ -93,8 +93,10 @@ // import setimmediate to temporary fix dataloader 2.0.0 bug | ||
defaultAppearance, | ||
appearanceMap | ||
appearances | ||
} = userPreferences; | ||
const matchedPath = Object.keys(appearanceMap).find(path => this.doesUrlMatchPath(path, url)); | ||
const matchedLabeledAppearance = appearances.find(({ | ||
urlSegment | ||
}) => this.doesUrlMatchPath(urlSegment, url)); | ||
if (matchedPath) { | ||
return appearanceMap[matchedPath]; | ||
if (matchedLabeledAppearance) { | ||
return matchedLabeledAppearance.appearance; | ||
} | ||
@@ -154,3 +156,3 @@ | ||
// eslint-disable-next-line | ||
console.warn(`Error when trying to check Smart Card url "${url} - ${e.prototype.name} ${e.message}`, e); | ||
console.warn(`Error when trying to check Smart Card url "${url} - ${e.name} ${e.message}`, e); | ||
} | ||
@@ -157,0 +159,0 @@ |
{ | ||
"name": "@atlaskit/link-provider", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"sideEffects": false | ||
} |
@@ -230,3 +230,3 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
var userPreferences, defaultAppearance, appearanceMap, matchedPath; | ||
var userPreferences, defaultAppearance, appearances, matchedLabeledAppearance; | ||
return _regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
@@ -255,8 +255,9 @@ while (1) { | ||
defaultAppearance = userPreferences.defaultAppearance, appearanceMap = userPreferences.appearanceMap; | ||
matchedPath = Object.keys(appearanceMap).find(function (path) { | ||
return _this2.doesUrlMatchPath(path, url); | ||
defaultAppearance = userPreferences.defaultAppearance, appearances = userPreferences.appearances; | ||
matchedLabeledAppearance = appearances.find(function (_ref) { | ||
var urlSegment = _ref.urlSegment; | ||
return _this2.doesUrlMatchPath(urlSegment, url); | ||
}); | ||
if (!matchedPath) { | ||
if (!matchedLabeledAppearance) { | ||
_context5.next = 10; | ||
@@ -266,3 +267,3 @@ break; | ||
return _context5.abrupt("return", appearanceMap[matchedPath]); | ||
return _context5.abrupt("return", matchedLabeledAppearance.appearance); | ||
@@ -414,3 +415,3 @@ case 10: | ||
// eslint-disable-next-line | ||
console.warn("Error when trying to check Smart Card url \"".concat(url, " - ").concat(_context7.t1.prototype.name, " ").concat(_context7.t1.message), _context7.t1); | ||
console.warn("Error when trying to check Smart Card url \"".concat(url, " - ").concat(_context7.t1.name, " ").concat(_context7.t1.message), _context7.t1); | ||
@@ -417,0 +418,0 @@ case 26: |
{ | ||
"name": "@atlaskit/link-provider", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"sideEffects": false | ||
} |
@@ -21,3 +21,6 @@ import { CardAppearance } from '@atlaskit/linking-common'; | ||
defaultAppearance: LinkAppearance; | ||
appearanceMap: Record<string, LinkAppearance>; | ||
appearances: { | ||
urlSegment: string; | ||
appearance: LinkAppearance; | ||
}[]; | ||
} | ||
@@ -24,0 +27,0 @@ export declare type ORSProvidersResponse = { |
{ | ||
"name": "@atlaskit/link-provider", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Contains provider with react context for anything link related and the link http client", | ||
@@ -29,3 +29,3 @@ "author": "Atlassian Pty Ltd", | ||
"dependencies": { | ||
"@atlaskit/linking-common": "^1.2.0", | ||
"@atlaskit/linking-common": "^1.3.0", | ||
"@babel/runtime": "^7.0.0", | ||
@@ -32,0 +32,0 @@ "async-retry": "^1.2.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
141298
3120