@atlaskit/link-create 1.13.2 → 1.14.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,17 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#66763](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66763) [`496a3feac442`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/496a3feac442) - Update `LinkPickerPlugin` Type to take a generic `entityKey` type
8
+
9
+ ## 1.13.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#64291](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64291) [`c44535acbea9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c44535acbea9) - remove platform.linking-platform.link-create.tmp-fix-translations to permanently return undefined in the loaderFn when dynamic import of locale messages fail.
14
+
3
15
  ## 1.13.2
4
16
 
5
17
  ### Patch Changes
@@ -8,13 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.fetchMessagesForLocale = void 0;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _en = _interopRequireDefault(require("../../../i18n/en"));
13
11
  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); }
14
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
13
  var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/function () {
16
14
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(locale) {
17
- var _messages, parentLocale, _messages2;
15
+ var messages, parentLocale, _messages;
18
16
  return _regenerator.default.wrap(function _callee$(_context) {
19
17
  while (1) switch (_context.prev = _context.next) {
20
18
  case 0:
@@ -28,8 +26,8 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
28
26
  });
29
27
  }( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(locale.replace('-', '_')));
30
28
  case 3:
31
- _messages = _context.sent;
32
- return _context.abrupt("return", _messages.default);
29
+ messages = _context.sent;
30
+ return _context.abrupt("return", messages.default);
33
31
  case 7:
34
32
  _context.prev = 7;
35
33
  _context.t0 = _context["catch"](0);
@@ -45,20 +43,12 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
45
43
  });
46
44
  }( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(parentLocale));
47
45
  case 13:
48
- _messages2 = _context.sent;
49
- return _context.abrupt("return", _messages2.default);
46
+ _messages = _context.sent;
47
+ return _context.abrupt("return", _messages.default);
50
48
  case 17:
51
49
  _context.prev = 17;
52
50
  _context.t1 = _context["catch"](9);
53
51
  case 19:
54
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.tmp-fix-translations')) {
55
- _context.next = 21;
56
- break;
57
- }
58
- return _context.abrupt("return");
59
- case 21:
60
- return _context.abrupt("return", _en.default);
61
- case 22:
62
52
  case "end":
63
53
  return _context.stop();
64
54
  }
@@ -31,7 +31,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
31
31
  }));
32
32
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
33
33
  packageName: "@atlaskit/link-create" || '',
34
- packageVersion: "1.13.2" || '',
34
+ packageVersion: "1.14.0" || '',
35
35
  component: _constants.COMPONENT_NAME,
36
36
  componentName: _constants.COMPONENT_NAME
37
37
  };
@@ -1,5 +1,3 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
- import messages from '../../../i18n/en';
3
1
  export const fetchMessagesForLocale = async locale => {
4
2
  try {
5
3
  const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */`../../../i18n/${locale.replace('-', '_')}`);
@@ -14,12 +12,4 @@ export const fetchMessagesForLocale = async locale => {
14
12
  } catch (e) {
15
13
  // ignore
16
14
  }
17
- if (getBooleanFF('platform.linking-platform.link-create.tmp-fix-translations')) {
18
- return;
19
- }
20
-
21
- /**
22
- * English bundled by default as this is the majority of users
23
- */
24
- return messages;
25
15
  };
@@ -23,7 +23,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
23
23
  }));
24
24
  export const PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.13.2" || '',
26
+ packageVersion: "1.14.0" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -1,10 +1,8 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
- import messages from '../../../i18n/en';
5
3
  export var fetchMessagesForLocale = /*#__PURE__*/function () {
6
4
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(locale) {
7
- var _messages, parentLocale, _messages2;
5
+ var messages, parentLocale, _messages;
8
6
  return _regeneratorRuntime.wrap(function _callee$(_context) {
9
7
  while (1) switch (_context.prev = _context.next) {
10
8
  case 0:
@@ -12,8 +10,8 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
12
10
  _context.next = 3;
13
11
  return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(locale.replace('-', '_')));
14
12
  case 3:
15
- _messages = _context.sent;
16
- return _context.abrupt("return", _messages.default);
13
+ messages = _context.sent;
14
+ return _context.abrupt("return", messages.default);
17
15
  case 7:
18
16
  _context.prev = 7;
19
17
  _context.t0 = _context["catch"](0);
@@ -23,20 +21,12 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
23
21
  _context.next = 13;
24
22
  return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(parentLocale));
25
23
  case 13:
26
- _messages2 = _context.sent;
27
- return _context.abrupt("return", _messages2.default);
24
+ _messages = _context.sent;
25
+ return _context.abrupt("return", _messages.default);
28
26
  case 17:
29
27
  _context.prev = 17;
30
28
  _context.t1 = _context["catch"](9);
31
29
  case 19:
32
- if (!getBooleanFF('platform.linking-platform.link-create.tmp-fix-translations')) {
33
- _context.next = 21;
34
- break;
35
- }
36
- return _context.abrupt("return");
37
- case 21:
38
- return _context.abrupt("return", messages);
39
- case 22:
40
30
  case "end":
41
31
  return _context.stop();
42
32
  }
@@ -23,7 +23,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
23
23
  }));
24
24
  export var PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.13.2" || '',
26
+ packageVersion: "1.14.0" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -32,7 +32,7 @@ export type EditViewProps = {
32
32
  */
33
33
  onClose: () => void;
34
34
  };
35
- export interface LinkCreatePlugin {
35
+ export interface LinkCreatePlugin<Key = string> {
36
36
  /**
37
37
  * The Group that this plugin entity belongs to
38
38
  */
@@ -48,7 +48,7 @@ export interface LinkCreatePlugin {
48
48
  /**
49
49
  * A unique key for the plugin entity
50
50
  */
51
- key: string;
51
+ key: Key;
52
52
  /**
53
53
  * A renderer function to render the form
54
54
  */
@@ -32,7 +32,7 @@ export type EditViewProps = {
32
32
  */
33
33
  onClose: () => void;
34
34
  };
35
- export interface LinkCreatePlugin {
35
+ export interface LinkCreatePlugin<Key = string> {
36
36
  /**
37
37
  * The Group that this plugin entity belongs to
38
38
  */
@@ -48,7 +48,7 @@ export interface LinkCreatePlugin {
48
48
  /**
49
49
  * A unique key for the plugin entity
50
50
  */
51
- key: string;
51
+ key: Key;
52
52
  /**
53
53
  * A renderer function to render the form
54
54
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "1.13.2",
3
+ "version": "1.14.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@atlaskit/analytics-next": "^9.1.0",
41
- "@atlaskit/button": "^17.1.0",
41
+ "@atlaskit/button": "^17.2.0",
42
42
  "@atlaskit/empty-state": "^7.6.0",
43
43
  "@atlaskit/form": "^9.0.3",
44
44
  "@atlaskit/icon": "^22.0.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/linking-common": "^5.3.0",
47
47
  "@atlaskit/modal-dialog": "^12.10.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.2.1",
49
- "@atlaskit/primitives": "^1.16.0",
49
+ "@atlaskit/primitives": "^1.17.0",
50
50
  "@atlaskit/select": "^17.0.3",
51
51
  "@atlaskit/spinner": "^16.0.0",
52
52
  "@atlaskit/textfield": "^6.0.0",
@@ -126,9 +126,6 @@
126
126
  "platform.linking-platform.link-create.tmp-log-error-message": {
127
127
  "type": "boolean"
128
128
  },
129
- "platform.linking-platform.link-create.tmp-fix-translations": {
130
- "type": "boolean"
131
- },
132
129
  "platform.linking-platform.link-create.slo-ignore-failed-fetch": {
133
130
  "type": "boolean"
134
131
  }