@atlaskit/editor-card-provider 3.1.10 → 3.1.11

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,11 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 3.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#62385](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62385) [`f3e422857a54`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f3e422857a54) - [ux] Updated default smart card view for Confluence Databases to include check for unsavedView parameter
8
+
3
9
  ## 3.1.10
4
10
 
5
11
  ### Patch Changes
@@ -52,7 +52,7 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
52
52
  }));
53
53
  };
54
54
  var isConfluenceDatabase = function isConfluenceDatabase(url) {
55
- return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
55
+ return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=.+).*)?$/);
56
56
  };
57
57
  var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
58
58
  function EditorCardProvider(envKey, baseUrlOverride) {
@@ -18,7 +18,7 @@ const isJwmView = url => url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+
18
18
  const isGiphyMedia = url => url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
19
19
  const isProformaView = url => url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
20
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})(\?\/)?/);
21
- const isConfluenceDatabase = url => url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
21
+ const isConfluenceDatabase = url => url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=.+).*)?$/);
22
22
  export class EditorCardProvider {
23
23
  constructor(envKey, baseUrlOverride) {
24
24
  this.baseUrl = baseUrlOverride || getBaseUrl(envKey);
@@ -44,7 +44,7 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
44
44
  }));
45
45
  };
46
46
  var isConfluenceDatabase = function isConfluenceDatabase(url) {
47
- return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
47
+ return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=.+).*)?$/);
48
48
  };
49
49
  export var EditorCardProvider = /*#__PURE__*/function () {
50
50
  function EditorCardProvider(envKey, baseUrlOverride) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
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,9 +34,9 @@
34
34
  ".": "./src/index.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/link-client-extension": "^1.7.0",
37
+ "@atlaskit/link-client-extension": "^1.8.0",
38
38
  "@atlaskit/link-extractors": "^1.2.0",
39
- "@atlaskit/linking-common": "^4.12.0",
39
+ "@atlaskit/linking-common": "^4.21.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "dataloader": "^2.0.0",
42
42
  "json-ld-types": "^3.9.1",
@@ -1,45 +0,0 @@
1
- ## API Report File for "@atlaskit/editor-card-provider"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { CardAdf } from '@atlaskit/linking-common';
8
- import { CardAppearance } from '@atlaskit/linking-common';
9
- import { DatasourceAdf } from '@atlaskit/linking-common';
10
-
11
- // @public (undocumented)
12
- const BaseUrls: {
13
- dev: string;
14
- development: string;
15
- stg: string;
16
- staging: string;
17
- prd: string;
18
- prod: string;
19
- production: string;
20
- };
21
-
22
- // @public (undocumented)
23
- interface CardProvider {
24
- // (undocumented)
25
- resolve(url: string, appearance: CardAppearance, shouldForceAppearance?: boolean): Promise<any>;
26
- }
27
-
28
- // @public (undocumented)
29
- export class EditorCardProvider implements CardProvider {
30
- constructor(envKey?: EnvironmentsKeys, baseUrlOverride?: string);
31
- // (undocumented)
32
- findPattern(url: string): Promise<boolean>;
33
- // (undocumented)
34
- resolve(url: string, appearance: CardAppearance, shouldForceAppearance?: boolean): Promise<CardAdf | DatasourceAdf>;
35
- }
36
-
37
- // @public (undocumented)
38
- export const editorCardProvider: EditorCardProvider;
39
-
40
- // @public (undocumented)
41
- type EnvironmentsKeys = keyof typeof BaseUrls;
42
-
43
- // (No @packageDocumentation comment for this package)
44
-
45
- ```