@atlaskit/editor-card-provider 6.7.2 → 6.7.4

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,21 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 6.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6655b2d3fda01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6655b2d3fda01) -
8
+ NAVX-4681: Remove platform_sl_3p_unauth_paste_as_block_card experiment (winning:
9
+ card_by_default_and_new_design), platform_sl_3p_unauth_paste_as_block_card_gate, and
10
+ platform_sl_3p_unauth_experiment_gate feature flags
11
+ - Updated dependencies
12
+
13
+ ## 6.7.3
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 6.7.2
4
20
 
5
21
  ### Patch Changes
@@ -775,7 +775,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
775
775
  key: "resolve",
776
776
  value: function () {
777
777
  var _resolve = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(url, appearance, shouldForceAppearance, isEmbedFriendlyLocation) {
778
- var hardCodedAppearance, _yield$Promise$all, _yield$Promise$all2, matchedProviderPattern, userPreference, data, issueAri, _this$onResolve, isSupported, providerDefaultAppearance, isEmbedFriendlyLocationEvaluated, preferredAppearance, canItBeEmbed, datasource, id, parameters, authStatus, access, isUnauthPasteAsBlockCardEnabled;
778
+ var hardCodedAppearance, _yield$Promise$all, _yield$Promise$all2, matchedProviderPattern, userPreference, data, issueAri, _this$onResolve, isSupported, providerDefaultAppearance, isEmbedFriendlyLocationEvaluated, preferredAppearance, canItBeEmbed, datasource, id, parameters, authStatus, access;
779
779
  return _regenerator.default.wrap(function _callee11$(_context11) {
780
780
  while (1) switch (_context11.prev = _context11.next) {
781
781
  case 0:
@@ -831,7 +831,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
831
831
  case 23:
832
832
  isSupported = _context11.t0;
833
833
  if (!isSupported) {
834
- _context11.next = 50;
834
+ _context11.next = 48;
835
835
  break;
836
836
  }
837
837
  providerDefaultAppearance = matchedProviderPattern === null || matchedProviderPattern === void 0 ? void 0 : matchedProviderPattern.defaultView;
@@ -880,8 +880,8 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
880
880
  }]
881
881
  }, url));
882
882
  case 39:
883
- if (!(isEmbedFriendlyLocationEvaluated && !userPreference && (0, _platformFeatureFlags.fg)('platform_sl_3p_unauth_paste_as_block_card_gate'))) {
884
- _context11.next = 49;
883
+ if (!(isEmbedFriendlyLocationEvaluated && !userPreference)) {
884
+ _context11.next = 47;
885
885
  break;
886
886
  }
887
887
  _context11.next = 42;
@@ -889,37 +889,32 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
889
889
  case 42:
890
890
  authStatus = _context11.sent;
891
891
  if (!authStatus) {
892
- _context11.next = 49;
892
+ _context11.next = 47;
893
893
  break;
894
894
  }
895
895
  access = authStatus.access;
896
896
  if (!(access === 'unauthorized')) {
897
- _context11.next = 49;
898
- break;
899
- }
900
- isUnauthPasteAsBlockCardEnabled = !(0, _expValEquals.expValEquals)('platform_sl_3p_unauth_paste_as_block_card', 'cohort', 'control', 'control');
901
- if (!isUnauthPasteAsBlockCardEnabled) {
902
- _context11.next = 49;
897
+ _context11.next = 47;
903
898
  break;
904
899
  }
905
900
  return _context11.abrupt("return", this.transformer.toSmartlinkAdf(url, 'block'));
906
- case 49:
901
+ case 47:
907
902
  return _context11.abrupt("return", this.transformer.toSmartlinkAdf(url, preferredAppearance));
908
- case 50:
909
- _context11.next = 55;
903
+ case 48:
904
+ _context11.next = 53;
910
905
  break;
911
- case 52:
912
- _context11.prev = 52;
906
+ case 50:
907
+ _context11.prev = 50;
913
908
  _context11.t1 = _context11["catch"](0);
914
909
  // eslint-disable-next-line
915
910
  console.warn("Error when trying to check Smart Card url \"".concat(url, "\"").concat(_context11.t1 instanceof Error ? " - ".concat(_context11.t1.name, " ").concat(_context11.t1.message) : ''), _context11.t1);
916
- case 55:
911
+ case 53:
917
912
  return _context11.abrupt("return", Promise.reject(undefined));
918
- case 56:
913
+ case 54:
919
914
  case "end":
920
915
  return _context11.stop();
921
916
  }
922
- }, _callee11, this, [[0, 52]]);
917
+ }, _callee11, this, [[0, 50]]);
923
918
  }));
924
919
  function resolve(_x1, _x10, _x11, _x12) {
925
920
  return _resolve.apply(this, arguments);
@@ -456,17 +456,14 @@ export class EditorCardProvider extends NodeDataProvider {
456
456
  }]
457
457
  }, url);
458
458
  }
459
- if (isEmbedFriendlyLocationEvaluated && !userPreference && fg('platform_sl_3p_unauth_paste_as_block_card_gate')) {
459
+ if (isEmbedFriendlyLocationEvaluated && !userPreference) {
460
460
  const authStatus = await this.getAuthStatusFromResolveResponse(url);
461
461
  if (authStatus) {
462
462
  const {
463
463
  access
464
464
  } = authStatus;
465
465
  if (access === 'unauthorized') {
466
- const isUnauthPasteAsBlockCardEnabled = !expValEquals('platform_sl_3p_unauth_paste_as_block_card', 'cohort', 'control', 'control');
467
- if (isUnauthPasteAsBlockCardEnabled) {
468
- return this.transformer.toSmartlinkAdf(url, 'block');
469
- }
466
+ return this.transformer.toSmartlinkAdf(url, 'block');
470
467
  }
471
468
  }
472
469
  }
@@ -767,7 +767,7 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
767
767
  key: "resolve",
768
768
  value: function () {
769
769
  var _resolve = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(url, appearance, shouldForceAppearance, isEmbedFriendlyLocation) {
770
- var hardCodedAppearance, _yield$Promise$all, _yield$Promise$all2, matchedProviderPattern, userPreference, data, issueAri, _this$onResolve, isSupported, providerDefaultAppearance, isEmbedFriendlyLocationEvaluated, preferredAppearance, canItBeEmbed, datasource, id, parameters, authStatus, access, isUnauthPasteAsBlockCardEnabled;
770
+ var hardCodedAppearance, _yield$Promise$all, _yield$Promise$all2, matchedProviderPattern, userPreference, data, issueAri, _this$onResolve, isSupported, providerDefaultAppearance, isEmbedFriendlyLocationEvaluated, preferredAppearance, canItBeEmbed, datasource, id, parameters, authStatus, access;
771
771
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
772
772
  while (1) switch (_context11.prev = _context11.next) {
773
773
  case 0:
@@ -823,7 +823,7 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
823
823
  case 23:
824
824
  isSupported = _context11.t0;
825
825
  if (!isSupported) {
826
- _context11.next = 50;
826
+ _context11.next = 48;
827
827
  break;
828
828
  }
829
829
  providerDefaultAppearance = matchedProviderPattern === null || matchedProviderPattern === void 0 ? void 0 : matchedProviderPattern.defaultView;
@@ -872,8 +872,8 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
872
872
  }]
873
873
  }, url));
874
874
  case 39:
875
- if (!(isEmbedFriendlyLocationEvaluated && !userPreference && fg('platform_sl_3p_unauth_paste_as_block_card_gate'))) {
876
- _context11.next = 49;
875
+ if (!(isEmbedFriendlyLocationEvaluated && !userPreference)) {
876
+ _context11.next = 47;
877
877
  break;
878
878
  }
879
879
  _context11.next = 42;
@@ -881,37 +881,32 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
881
881
  case 42:
882
882
  authStatus = _context11.sent;
883
883
  if (!authStatus) {
884
- _context11.next = 49;
884
+ _context11.next = 47;
885
885
  break;
886
886
  }
887
887
  access = authStatus.access;
888
888
  if (!(access === 'unauthorized')) {
889
- _context11.next = 49;
890
- break;
891
- }
892
- isUnauthPasteAsBlockCardEnabled = !expValEquals('platform_sl_3p_unauth_paste_as_block_card', 'cohort', 'control', 'control');
893
- if (!isUnauthPasteAsBlockCardEnabled) {
894
- _context11.next = 49;
889
+ _context11.next = 47;
895
890
  break;
896
891
  }
897
892
  return _context11.abrupt("return", this.transformer.toSmartlinkAdf(url, 'block'));
898
- case 49:
893
+ case 47:
899
894
  return _context11.abrupt("return", this.transformer.toSmartlinkAdf(url, preferredAppearance));
900
- case 50:
901
- _context11.next = 55;
895
+ case 48:
896
+ _context11.next = 53;
902
897
  break;
903
- case 52:
904
- _context11.prev = 52;
898
+ case 50:
899
+ _context11.prev = 50;
905
900
  _context11.t1 = _context11["catch"](0);
906
901
  // eslint-disable-next-line
907
902
  console.warn("Error when trying to check Smart Card url \"".concat(url, "\"").concat(_context11.t1 instanceof Error ? " - ".concat(_context11.t1.name, " ").concat(_context11.t1.message) : ''), _context11.t1);
908
- case 55:
903
+ case 53:
909
904
  return _context11.abrupt("return", Promise.reject(undefined));
910
- case 56:
905
+ case 54:
911
906
  case "end":
912
907
  return _context11.stop();
913
908
  }
914
- }, _callee11, this, [[0, 52]]);
909
+ }, _callee11, this, [[0, 50]]);
915
910
  }));
916
911
  function resolve(_x1, _x10, _x11, _x12) {
917
912
  return _resolve.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "6.7.2",
3
+ "version": "6.7.4",
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": "^11.0.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^66.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^68.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "dataloader": "^2.1.0"
45
45
  },
@@ -57,9 +57,6 @@
57
57
  "issue-link-suggestions-in-comments": {
58
58
  "type": "boolean"
59
59
  },
60
- "platform_sl_3p_unauth_paste_as_block_card_gate": {
61
- "type": "boolean"
62
- },
63
60
  "avp_unfurl_shared_charts_embed_by_default_2": {
64
61
  "type": "boolean"
65
62
  },