@atlaskit/editor-card-provider 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/provider.js +2 -5
- package/dist/es2019/provider.js +1 -5
- package/dist/esm/provider.js +1 -5
- package/dist/types/provider.d.ts +0 -1
- package/dist/types-ts4.5/provider.d.ts +0 -1
- package/package.json +6 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`4f0da3d4d6c4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f0da3d4d6c4e) -
|
|
8
|
+
EDM-10533 Cleanup platform.linking-platform.embed-youtube-by-default FF
|
|
9
|
+
|
|
10
|
+
## 3.7.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#134513](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134513)
|
|
15
|
+
[`9908df0490fce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9908df0490fce) -
|
|
16
|
+
NO-ISSUE: remmove unneeded setimmediate dependency
|
|
17
|
+
|
|
3
18
|
## 3.7.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -13,18 +13,15 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
13
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
15
|
var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
|
|
16
|
-
require("setimmediate");
|
|
17
16
|
var _dataloader = _interopRequireDefault(require("dataloader"));
|
|
18
17
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
19
18
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
20
19
|
var _transformer = require("./transformer");
|
|
21
20
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
22
21
|
var api = _interopRequireWildcard(require("./api"));
|
|
23
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
-
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = new RegExp(e, t); return r.set(o, p || r.get(e)), (0, _setPrototypeOf2.default)(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return (0, _inherits2.default)(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
27
|
-
// @see https://github.com/graphql/dataloader/issues/249
|
|
24
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = new RegExp(e, t); return r.set(o, p || r.get(e)), (0, _setPrototypeOf2.default)(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return (0, _inherits2.default)(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
28
25
|
var BATCH_WAIT_TIME = 50;
|
|
29
26
|
|
|
30
27
|
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
@@ -349,7 +346,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
|
349
346
|
}, {
|
|
350
347
|
key: "getHardCodedAppearance",
|
|
351
348
|
value: function getHardCodedAppearance(url) {
|
|
352
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) ||
|
|
349
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
353
350
|
return 'embed';
|
|
354
351
|
}
|
|
355
352
|
}
|
package/dist/es2019/provider.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
2
|
-
// @see https://github.com/graphql/dataloader/issues/249
|
|
3
|
-
import 'setimmediate';
|
|
4
1
|
import DataLoader from 'dataloader';
|
|
5
2
|
import { getStatus } from '@atlaskit/linking-common';
|
|
6
3
|
import { extractPreview } from '@atlaskit/link-extractors';
|
|
@@ -8,7 +5,6 @@ import { Transformer } from './transformer';
|
|
|
8
5
|
import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
|
|
9
6
|
import { CardClient } from '@atlaskit/link-provider';
|
|
10
7
|
import * as api from './api';
|
|
11
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
8
|
const BATCH_WAIT_TIME = 50;
|
|
13
9
|
|
|
14
10
|
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
@@ -132,7 +128,7 @@ export class EditorCardProvider {
|
|
|
132
128
|
* @returns 'embed' for the card appearance to embed by default
|
|
133
129
|
*/
|
|
134
130
|
getHardCodedAppearance(url) {
|
|
135
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) ||
|
|
131
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
136
132
|
return 'embed';
|
|
137
133
|
}
|
|
138
134
|
}
|
package/dist/esm/provider.js
CHANGED
|
@@ -7,9 +7,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _setPrototypeOf from "@babel/runtime/helpers/setPrototypeOf";
|
|
8
8
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
9
|
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = new RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
10
|
-
// import setimmediate to temporary fix dataloader 2.0.0 bug
|
|
11
|
-
// @see https://github.com/graphql/dataloader/issues/249
|
|
12
|
-
import 'setimmediate';
|
|
13
10
|
import DataLoader from 'dataloader';
|
|
14
11
|
import { getStatus } from '@atlaskit/linking-common';
|
|
15
12
|
import { extractPreview } from '@atlaskit/link-extractors';
|
|
@@ -17,7 +14,6 @@ import { Transformer } from './transformer';
|
|
|
17
14
|
import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
|
|
18
15
|
import { CardClient } from '@atlaskit/link-provider';
|
|
19
16
|
import * as api from './api';
|
|
20
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
21
17
|
var BATCH_WAIT_TIME = 50;
|
|
22
18
|
|
|
23
19
|
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
@@ -342,7 +338,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
342
338
|
}, {
|
|
343
339
|
key: "getHardCodedAppearance",
|
|
344
340
|
value: function getHardCodedAppearance(url) {
|
|
345
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) ||
|
|
341
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
346
342
|
return 'embed';
|
|
347
343
|
}
|
|
348
344
|
}
|
package/dist/types/provider.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-card-provider",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
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",
|
|
@@ -36,26 +36,18 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/eslint-plugin-platform": "0.7.3",
|
|
39
|
-
"@atlaskit/link-client-extension": "^2.
|
|
40
|
-
"@atlaskit/link-extractors": "^1.
|
|
41
|
-
"@atlaskit/linking-common": "^5.
|
|
42
|
-
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
39
|
+
"@atlaskit/link-client-extension": "^2.2.0",
|
|
40
|
+
"@atlaskit/link-extractors": "^1.9.0",
|
|
41
|
+
"@atlaskit/linking-common": "^5.11.0",
|
|
43
42
|
"@babel/runtime": "^7.0.0",
|
|
44
|
-
"dataloader": "^2.
|
|
45
|
-
"json-ld-types": "^4.1.0"
|
|
46
|
-
"setimmediate": "^1.0.5"
|
|
43
|
+
"dataloader": "^2.1.0",
|
|
44
|
+
"json-ld-types": "^4.1.0"
|
|
47
45
|
},
|
|
48
46
|
"peerDependencies": {
|
|
49
47
|
"@atlaskit/link-provider": "^1.14.0",
|
|
50
48
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
51
49
|
},
|
|
52
50
|
"devDependencies": {
|
|
53
|
-
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
54
51
|
"typescript": "~5.4.2"
|
|
55
|
-
},
|
|
56
|
-
"platform-feature-flags": {
|
|
57
|
-
"platform.linking-platform.embed-youtube-by-default": {
|
|
58
|
-
"type": "boolean"
|
|
59
|
-
}
|
|
60
52
|
}
|
|
61
53
|
}
|