@atlaskit/editor-card-provider 3.0.2 → 3.0.4
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/CHANGELOG.md +13 -0
- package/dist/cjs/provider.js +21 -10
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/provider.js +7 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/provider.js +22 -8
- package/dist/esm/version.json +1 -1
- package/package.json +3 -3
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1674b5907b4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1674b5907b4) - [ux] Make confluence whiteboard urls default to embed view
|
|
8
|
+
|
|
9
|
+
## 3.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f10ed88032c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f10ed88032c) - With the renaming of Jira Roadmaps to Timeline, we are updating the regex rules to match timeline in conjunction to roadmaps
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 3.0.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -11,6 +11,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
|
|
14
16
|
require("setimmediate");
|
|
15
17
|
var _dataloader = _interopRequireDefault(require("dataloader"));
|
|
16
18
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
@@ -21,12 +23,14 @@ var _linkProvider = require("@atlaskit/link-provider");
|
|
|
21
23
|
var api = _interopRequireWildcard(require("./api"));
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
-
// import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
26
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), (0, _setPrototypeOf2.default)(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { var i = g[name]; if ("number" == typeof i) groups[name] = result[i];else { for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++; groups[name] = result[i[k]]; } return groups; }, Object.create(null)); } return (0, _inherits2.default)(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) { result.groups = buildGroups(result, this); var indices = result.indices; indices && (indices.groups = buildGroups(indices, this)); } return result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { var group = groups[name]; return "$" + (Array.isArray(group) ? group.join("$") : group); })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); } // import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
25
27
|
// @see https://github.com/graphql/dataloader/issues/249
|
|
26
|
-
|
|
27
28
|
var BATCH_WAIT_TIME = 50;
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
31
|
+
// NOT to be confused with JSM timeline
|
|
32
|
+
var isJiraRoadmapOrTimeline = function isJiraRoadmapOrTimeline(url) {
|
|
33
|
+
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
30
34
|
};
|
|
31
35
|
var isPolarisView = function isPolarisView(url) {
|
|
32
36
|
return url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w+/);
|
|
@@ -40,9 +44,16 @@ var isGiphyMedia = function isGiphyMedia(url) {
|
|
|
40
44
|
var isProformaView = function isProformaView(url) {
|
|
41
45
|
return url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
42
46
|
};
|
|
47
|
+
var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
48
|
+
return url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/?.*\/whiteboard\/(\d+)(\?\/)?/, {
|
|
49
|
+
resourceId: 1
|
|
50
|
+
})) || url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/?.*\/whiteboard\/([0-9a-fA-F]{8}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{12})(\?\/)?/, {
|
|
51
|
+
resourceId: 1
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
43
54
|
var EditorCardProvider = /*#__PURE__*/function () {
|
|
44
55
|
function EditorCardProvider(envKey, baseUrlOverride) {
|
|
45
|
-
var
|
|
56
|
+
var _this2 = this;
|
|
46
57
|
(0, _classCallCheck2.default)(this, EditorCardProvider);
|
|
47
58
|
this.baseUrl = baseUrlOverride || (0, _environments.getBaseUrl)(envKey);
|
|
48
59
|
this.resolverUrl = (0, _environments.getResolverUrl)(envKey, baseUrlOverride);
|
|
@@ -51,7 +62,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
51
62
|
Origin: this.baseUrl
|
|
52
63
|
};
|
|
53
64
|
this.providersLoader = new _dataloader.default(function (keys) {
|
|
54
|
-
return
|
|
65
|
+
return _this2.batchProviders(keys);
|
|
55
66
|
}, {
|
|
56
67
|
batchScheduleFn: function batchScheduleFn(callback) {
|
|
57
68
|
return setTimeout(callback, BATCH_WAIT_TIME);
|
|
@@ -230,7 +241,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
230
241
|
value: function () {
|
|
231
242
|
var _findUserPreference = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(url) {
|
|
232
243
|
var _this$providersData,
|
|
233
|
-
|
|
244
|
+
_this3 = this;
|
|
234
245
|
var userPreferences, defaultAppearance, appearances, allMatchedLabeledAppearances, longestMatchedLabeledAppearance;
|
|
235
246
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
236
247
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -250,7 +261,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
250
261
|
defaultAppearance = userPreferences.defaultAppearance, appearances = userPreferences.appearances;
|
|
251
262
|
allMatchedLabeledAppearances = appearances.filter(function (_ref) {
|
|
252
263
|
var urlSegment = _ref.urlSegment;
|
|
253
|
-
return
|
|
264
|
+
return _this3.doesUrlMatchPath(urlSegment, url);
|
|
254
265
|
});
|
|
255
266
|
if (!(allMatchedLabeledAppearances.length > 0)) {
|
|
256
267
|
_context6.next = 10;
|
|
@@ -309,7 +320,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
309
320
|
}, {
|
|
310
321
|
key: "getHardCodedAppearance",
|
|
311
322
|
value: function getHardCodedAppearance(url) {
|
|
312
|
-
if (
|
|
323
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
313
324
|
return 'embed';
|
|
314
325
|
}
|
|
315
326
|
}
|
|
@@ -414,7 +425,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
414
425
|
// if user's default choice is NOT "inline" (so, block or embed at this point, url was dealt with above)
|
|
415
426
|
userPreference ||
|
|
416
427
|
// If user's default choice is "inline" or user hasn't specified preferences at all,
|
|
417
|
-
// we check whatever one of the hardcoded providers match url (jira
|
|
428
|
+
// we check whatever one of the hardcoded providers match url (jira /timeline, polaris, etc)
|
|
418
429
|
hardCodedAppearance ||
|
|
419
430
|
// If non match, we see if this provider has default appearance for this particular regexp
|
|
420
431
|
providerDefaultAppearance ||
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/provider.js
CHANGED
|
@@ -9,11 +9,15 @@ import { getStatus } from './utils';
|
|
|
9
9
|
import { CardClient } from '@atlaskit/link-provider';
|
|
10
10
|
import * as api from './api';
|
|
11
11
|
const BATCH_WAIT_TIME = 50;
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
14
|
+
// NOT to be confused with JSM timeline
|
|
15
|
+
const isJiraRoadmapOrTimeline = url => url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
13
16
|
const isPolarisView = url => url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w+/);
|
|
14
17
|
const isJwmView = url => url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
15
18
|
const isGiphyMedia = url => url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
16
19
|
const isProformaView = url => url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
20
|
+
const isConfluenceWhiteboard = url => url.match(/\/wiki\/spaces\/?.*\/whiteboard\/(?<resourceId>\d+)(\?\/)?/) || url.match(/\/wiki\/spaces\/?.*\/whiteboard\/(?<resourceId>[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12})(\?\/)?/);
|
|
17
21
|
export class EditorCardProvider {
|
|
18
22
|
constructor(envKey, baseUrlOverride) {
|
|
19
23
|
this.baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
@@ -105,7 +109,7 @@ export class EditorCardProvider {
|
|
|
105
109
|
return (_this$providersData2 = this.providersData) === null || _this$providersData2 === void 0 ? void 0 : _this$providersData2.patterns.find(pattern => url.match(pattern.source));
|
|
106
110
|
}
|
|
107
111
|
getHardCodedAppearance(url) {
|
|
108
|
-
if (
|
|
112
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
109
113
|
return 'embed';
|
|
110
114
|
}
|
|
111
115
|
}
|
|
@@ -158,7 +162,7 @@ export class EditorCardProvider {
|
|
|
158
162
|
// if user's default choice is NOT "inline" (so, block or embed at this point, url was dealt with above)
|
|
159
163
|
userPreference ||
|
|
160
164
|
// If user's default choice is "inline" or user hasn't specified preferences at all,
|
|
161
|
-
// we check whatever one of the hardcoded providers match url (jira
|
|
165
|
+
// we check whatever one of the hardcoded providers match url (jira /timeline, polaris, etc)
|
|
162
166
|
hardCodedAppearance ||
|
|
163
167
|
// If non match, we see if this provider has default appearance for this particular regexp
|
|
164
168
|
providerDefaultAppearance ||
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/provider.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _setPrototypeOf from "@babel/runtime/helpers/setPrototypeOf";
|
|
5
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { var i = g[name]; if ("number" == typeof i) groups[name] = result[i];else { for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++; groups[name] = result[i[k]]; } return groups; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) { result.groups = buildGroups(result, this); var indices = result.indices; indices && (indices.groups = buildGroups(indices, this)); } return result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { var group = groups[name]; return "$" + (Array.isArray(group) ? group.join("$") : group); })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); }
|
|
6
10
|
// import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
7
11
|
// @see https://github.com/graphql/dataloader/issues/249
|
|
8
12
|
import 'setimmediate';
|
|
@@ -14,8 +18,11 @@ import { getStatus } from './utils';
|
|
|
14
18
|
import { CardClient } from '@atlaskit/link-provider';
|
|
15
19
|
import * as api from './api';
|
|
16
20
|
var BATCH_WAIT_TIME = 50;
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
|
|
22
|
+
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
23
|
+
// NOT to be confused with JSM timeline
|
|
24
|
+
var isJiraRoadmapOrTimeline = function isJiraRoadmapOrTimeline(url) {
|
|
25
|
+
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
19
26
|
};
|
|
20
27
|
var isPolarisView = function isPolarisView(url) {
|
|
21
28
|
return url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w+/);
|
|
@@ -29,9 +36,16 @@ var isGiphyMedia = function isGiphyMedia(url) {
|
|
|
29
36
|
var isProformaView = function isProformaView(url) {
|
|
30
37
|
return url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
31
38
|
};
|
|
39
|
+
var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
40
|
+
return url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/?.*\/whiteboard\/(\d+)(\?\/)?/, {
|
|
41
|
+
resourceId: 1
|
|
42
|
+
})) || url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/?.*\/whiteboard\/([0-9a-fA-F]{8}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{4}\b\x2D[0-9a-fA-F]{12})(\?\/)?/, {
|
|
43
|
+
resourceId: 1
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
32
46
|
export var EditorCardProvider = /*#__PURE__*/function () {
|
|
33
47
|
function EditorCardProvider(envKey, baseUrlOverride) {
|
|
34
|
-
var
|
|
48
|
+
var _this2 = this;
|
|
35
49
|
_classCallCheck(this, EditorCardProvider);
|
|
36
50
|
this.baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
37
51
|
this.resolverUrl = getResolverUrl(envKey, baseUrlOverride);
|
|
@@ -40,7 +54,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
40
54
|
Origin: this.baseUrl
|
|
41
55
|
};
|
|
42
56
|
this.providersLoader = new DataLoader(function (keys) {
|
|
43
|
-
return
|
|
57
|
+
return _this2.batchProviders(keys);
|
|
44
58
|
}, {
|
|
45
59
|
batchScheduleFn: function batchScheduleFn(callback) {
|
|
46
60
|
return setTimeout(callback, BATCH_WAIT_TIME);
|
|
@@ -219,7 +233,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
219
233
|
value: function () {
|
|
220
234
|
var _findUserPreference = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(url) {
|
|
221
235
|
var _this$providersData,
|
|
222
|
-
|
|
236
|
+
_this3 = this;
|
|
223
237
|
var userPreferences, defaultAppearance, appearances, allMatchedLabeledAppearances, longestMatchedLabeledAppearance;
|
|
224
238
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
225
239
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -239,7 +253,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
239
253
|
defaultAppearance = userPreferences.defaultAppearance, appearances = userPreferences.appearances;
|
|
240
254
|
allMatchedLabeledAppearances = appearances.filter(function (_ref) {
|
|
241
255
|
var urlSegment = _ref.urlSegment;
|
|
242
|
-
return
|
|
256
|
+
return _this3.doesUrlMatchPath(urlSegment, url);
|
|
243
257
|
});
|
|
244
258
|
if (!(allMatchedLabeledAppearances.length > 0)) {
|
|
245
259
|
_context6.next = 10;
|
|
@@ -298,7 +312,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
298
312
|
}, {
|
|
299
313
|
key: "getHardCodedAppearance",
|
|
300
314
|
value: function getHardCodedAppearance(url) {
|
|
301
|
-
if (
|
|
315
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
302
316
|
return 'embed';
|
|
303
317
|
}
|
|
304
318
|
}
|
|
@@ -403,7 +417,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
403
417
|
// if user's default choice is NOT "inline" (so, block or embed at this point, url was dealt with above)
|
|
404
418
|
userPreference ||
|
|
405
419
|
// If user's default choice is "inline" or user hasn't specified preferences at all,
|
|
406
|
-
// we check whatever one of the hardcoded providers match url (jira
|
|
420
|
+
// we check whatever one of the hardcoded providers match url (jira /timeline, polaris, etc)
|
|
407
421
|
hardCodedAppearance ||
|
|
408
422
|
// If non match, we see if this provider has default appearance for this particular regexp
|
|
409
423
|
providerDefaultAppearance ||
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-card-provider",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Contains the EditorCardProvider, for determining smart card behaviour in the editor.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
".": "./src/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/linking-common": "^2.
|
|
37
|
+
"@atlaskit/linking-common": "^2.15.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"dataloader": "^2.0.0",
|
|
40
40
|
"json-ld-types": "3.7.0",
|
|
41
41
|
"setimmediate": "^1.0.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@atlaskit/link-provider": "^1.6.
|
|
44
|
+
"@atlaskit/link-provider": "^1.6.3",
|
|
45
45
|
"react": "^16.8.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|