@atlaskit/editor-card-provider 3.1.4 → 3.1.5

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 3.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`83f06b6e7f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/83f06b6e7f6) - Update to use 'getStatus' from '@atlaskit/linking-common'
8
+ - Updated dependencies
9
+
3
10
  ## 3.1.4
4
11
 
5
12
  ### Patch Changes
@@ -15,10 +15,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
15
15
  var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
16
16
  require("setimmediate");
17
17
  var _dataloader = _interopRequireDefault(require("dataloader"));
18
+ var _linkingCommon = require("@atlaskit/linking-common");
18
19
  var _linkExtractors = require("@atlaskit/link-extractors");
19
20
  var _transformer = require("./transformer");
20
21
  var _environments = require("./environments");
21
- var _utils = require("./utils");
22
22
  var _linkProvider = require("@atlaskit/link-provider");
23
23
  var api = _interopRequireWildcard(require("./api"));
24
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); }
@@ -109,7 +109,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
109
109
  return this.cardClient.fetchData(resourceUrl);
110
110
  case 3:
111
111
  response = _context2.sent;
112
- if (!((0, _utils.getStatus)(response) !== 'not_found')) {
112
+ if (!((0, _linkingCommon.getStatus)(response) !== 'not_found')) {
113
113
  _context2.next = 6;
114
114
  break;
115
115
  }
@@ -348,7 +348,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
348
348
  }
349
349
  return _context8.abrupt("return", false);
350
350
  case 7:
351
- if (!((0, _utils.getStatus)(details) !== 'resolved')) {
351
+ if (!((0, _linkingCommon.getStatus)(details) !== 'resolved')) {
352
352
  _context8.next = 9;
353
353
  break;
354
354
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -2,10 +2,10 @@
2
2
  // @see https://github.com/graphql/dataloader/issues/249
3
3
  import 'setimmediate';
4
4
  import DataLoader from 'dataloader';
5
+ import { getStatus } from '@atlaskit/linking-common';
5
6
  import { extractPreview } from '@atlaskit/link-extractors';
6
7
  import { Transformer } from './transformer';
7
8
  import { getBaseUrl, getResolverUrl } from './environments';
8
- 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;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -11,10 +11,10 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return
11
11
  // @see https://github.com/graphql/dataloader/issues/249
12
12
  import 'setimmediate';
13
13
  import DataLoader from 'dataloader';
14
+ import { getStatus } from '@atlaskit/linking-common';
14
15
  import { extractPreview } from '@atlaskit/link-extractors';
15
16
  import { Transformer } from './transformer';
16
17
  import { getBaseUrl, getResolverUrl } from './environments';
17
- import { getStatus } from './utils';
18
18
  import { CardClient } from '@atlaskit/link-provider';
19
19
  import * as api from './api';
20
20
  var BATCH_WAIT_TIME = 50;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
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,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@atlaskit/link-client-extension": "^1.5.0",
38
38
  "@atlaskit/link-extractors": "^1.1.0",
39
- "@atlaskit/linking-common": "^4.0.0",
39
+ "@atlaskit/linking-common": "^4.1.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "dataloader": "^2.0.0",
42
42
  "json-ld-types": "3.7.0",
package/dist/cjs/utils.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getStatus = void 0;
7
- var getStatus = function getStatus(_ref) {
8
- var meta = _ref.meta;
9
- var access = meta.access,
10
- visibility = meta.visibility;
11
- switch (access) {
12
- case 'forbidden':
13
- if (visibility === 'not_found') {
14
- return 'not_found';
15
- } else {
16
- return 'forbidden';
17
- }
18
- case 'unauthorized':
19
- return 'unauthorized';
20
- default:
21
- return 'resolved';
22
- }
23
- };
24
- exports.getStatus = getStatus;
@@ -1,20 +0,0 @@
1
- export const getStatus = ({
2
- meta
3
- }) => {
4
- const {
5
- access,
6
- visibility
7
- } = meta;
8
- switch (access) {
9
- case 'forbidden':
10
- if (visibility === 'not_found') {
11
- return 'not_found';
12
- } else {
13
- return 'forbidden';
14
- }
15
- case 'unauthorized':
16
- return 'unauthorized';
17
- default:
18
- return 'resolved';
19
- }
20
- };
package/dist/esm/utils.js DELETED
@@ -1,17 +0,0 @@
1
- export var getStatus = function getStatus(_ref) {
2
- var meta = _ref.meta;
3
- var access = meta.access,
4
- visibility = meta.visibility;
5
- switch (access) {
6
- case 'forbidden':
7
- if (visibility === 'not_found') {
8
- return 'not_found';
9
- } else {
10
- return 'forbidden';
11
- }
12
- case 'unauthorized':
13
- return 'unauthorized';
14
- default:
15
- return 'resolved';
16
- }
17
- };
@@ -1,3 +0,0 @@
1
- import { JsonLd } from 'json-ld-types';
2
- import { CardType } from '@atlaskit/linking-common';
3
- export declare const getStatus: ({ meta }: JsonLd.Response) => CardType;
@@ -1,3 +0,0 @@
1
- import { JsonLd } from 'json-ld-types';
2
- import { CardType } from '@atlaskit/linking-common';
3
- export declare const getStatus: ({ meta }: JsonLd.Response) => CardType;