@atlaskit/editor-card-provider 6.4.21 → 6.5.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 6.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`df047c96e4f78`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df047c96e4f78) -
8
+ Refresh cash for a smart card if it's not been fetched before
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 6.4.22
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 6.4.21
4
21
 
5
22
  ### Patch Changes
@@ -165,6 +165,13 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
165
165
  }
166
166
  (0, _inherits2.default)(EditorCardProvider, _ref);
167
167
  return (0, _createClass2.default)(EditorCardProvider, [{
168
+ key: "refreshCache",
169
+ value: function refreshCache(node) {
170
+ if (this.getCacheStatusForNode(node) !== 'network') {
171
+ this.getData(node, function () {});
172
+ }
173
+ }
174
+ }, {
168
175
  key: "getData",
169
176
  value: function getData(node, callback) {
170
177
  var _this2 = this;
@@ -89,6 +89,11 @@ export class EditorCardProvider extends NodeDataProvider {
89
89
  this.cardClient.setProduct(product);
90
90
  }
91
91
  }
92
+ refreshCache(node) {
93
+ if (this.getCacheStatusForNode(node) !== 'network') {
94
+ this.getData(node, () => {});
95
+ }
96
+ }
92
97
  getData(node, callback) {
93
98
  if (expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) === false) {
94
99
  // if local cache feature flag is disabled, fall back to the base implementation
@@ -160,6 +160,13 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
160
160
  }
161
161
  _inherits(EditorCardProvider, _ref);
162
162
  return _createClass(EditorCardProvider, [{
163
+ key: "refreshCache",
164
+ value: function refreshCache(node) {
165
+ if (this.getCacheStatusForNode(node) !== 'network') {
166
+ this.getData(node, function () {});
167
+ }
168
+ }
169
+ }, {
163
170
  key: "getData",
164
171
  value: function getData(node, callback) {
165
172
  var _this2 = this;
@@ -20,6 +20,7 @@ export declare class EditorCardProvider extends NodeDataProvider<CardNode, JsonL
20
20
  private smartCardLocalCacheClient;
21
21
  private onResolve;
22
22
  constructor(envKey?: EnvironmentsKeys, baseUrlOverride?: string, product?: ProductType, onResolve?: (url: string) => void, customCardClient?: CardClient);
23
+ refreshCache(node: CardNode | PMNode): void;
23
24
  getData(node: CardNode | PMNode, callback: (payload: CallbackPayload<JsonLd.Response>) => void): void;
24
25
  nodeDataKey(node: CardNode): string;
25
26
  fetchNodesData(nodes: CardNode[]): Promise<JsonLd.Response[]>;
@@ -20,6 +20,7 @@ export declare class EditorCardProvider extends NodeDataProvider<CardNode, JsonL
20
20
  private smartCardLocalCacheClient;
21
21
  private onResolve;
22
22
  constructor(envKey?: EnvironmentsKeys, baseUrlOverride?: string, product?: ProductType, onResolve?: (url: string) => void, customCardClient?: CardClient);
23
+ refreshCache(node: CardNode | PMNode): void;
23
24
  getData(node: CardNode | PMNode, callback: (payload: CallbackPayload<JsonLd.Response>) => void): void;
24
25
  nodeDataKey(node: CardNode): string;
25
26
  fetchNodesData(nodes: CardNode[]): Promise<JsonLd.Response[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "6.4.21",
3
+ "version": "6.5.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",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/linking-types": "^14.2.0",
40
40
  "@atlaskit/node-data-provider": "^9.0.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^40.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^42.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "dataloader": "^2.1.0"
45
45
  },