@atlaskit/editor-card-provider 5.0.3 → 5.1.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.
@@ -1,6 +1,7 @@
1
1
  import { type CardAdf, type CardAppearance, type DatasourceAdf, type ProductType } from '@atlaskit/linking-common';
2
2
  import { type CardProvider } from './types';
3
3
  import { type EnvironmentsKeys } from '@atlaskit/linking-common';
4
+ export declare const isJiraWorkItem: (url: string) => boolean;
4
5
  export declare class EditorCardProvider implements CardProvider {
5
6
  private baseUrl;
6
7
  private resolverUrl;
@@ -9,9 +10,12 @@ export declare class EditorCardProvider implements CardProvider {
9
10
  private transformer;
10
11
  private providersLoader;
11
12
  private cardClient;
12
- constructor(envKey?: EnvironmentsKeys, baseUrlOverride?: string, product?: ProductType);
13
+ private onResolve;
14
+ constructor(envKey?: EnvironmentsKeys, baseUrlOverride?: string, product?: ProductType, onResolve?: (url: string) => void);
13
15
  private batchProviders;
14
16
  private checkLinkResolved;
17
+ private fetchDataForResource;
18
+ private extractAriFromData;
15
19
  private fetchProvidersData;
16
20
  private loadProviderData;
17
21
  findPattern(url: string): Promise<boolean>;
@@ -37,6 +41,10 @@ export declare class EditorCardProvider implements CardProvider {
37
41
  * Make a /resolve call and find out if result has datasource capability
38
42
  */
39
43
  private getDatasourceFromResolveResponse;
44
+ /**
45
+ * This is used to determine if the url is a local Jira url or a remote one.
46
+ */
47
+ private isLocalUrl;
40
48
  resolve(url: string, appearance: CardAppearance, shouldForceAppearance?: boolean, isEmbedFriendlyLocation?: boolean): Promise<CardAdf | DatasourceAdf>;
41
49
  }
42
50
  export declare const editorCardProvider: EditorCardProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "5.0.3",
3
+ "version": "5.1.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,9 +36,9 @@
36
36
  "@atlaskit/feature-gate-js-client": "^5.3.0",
37
37
  "@atlaskit/json-ld-types": "^1.2.0",
38
38
  "@atlaskit/link-client-extension": "^5.0.0",
39
- "@atlaskit/link-extractors": "^2.3.0",
40
- "@atlaskit/linking-common": "^9.0.0",
41
- "@atlaskit/linking-types": "^12.0.0",
39
+ "@atlaskit/link-extractors": "^2.4.0",
40
+ "@atlaskit/linking-common": "^9.1.0",
41
+ "@atlaskit/linking-types": "^12.1.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "dataloader": "^2.1.0"
@@ -69,6 +69,9 @@
69
69
  },
70
70
  "jira_nin_smart_link": {
71
71
  "type": "boolean"
72
+ },
73
+ "issue-link-suggestions-in-comments": {
74
+ "type": "boolean"
72
75
  }
73
76
  },
74
77
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/e145f3e3-514b-410f-a274-a92e6e6f9c47"